Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
靠!!!嗷嗷超时!!!这也能超?????????#include<stdio.h> int main() { int n,k,i,j; while(EOF!=scanf("%d%d",&n,&k)) { if(n==0) {printf("0\n");continue;} i=n,j=0; while(i>=k) { i=i-k+1; j++; } n=n+j; printf("%d\n",n); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator