Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:靠!!!嗷嗷超时!!!这也能超?????????

Posted by caizhicong0503 at 2007-02-08 02:42:33 on Problem 2509
In Reply To:靠!!!嗷嗷超时!!!这也能超????????? Posted by:wzf123 at 2006-07-21 17:03:06
> #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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator