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 huhuhuhh at 2010-05-17 19:41:20 on Problem 2509
In Reply To:大家要注意,不要直接除以,这样剩余烟头会没掉的。 Posted by:denghongchao at 2010-01-21 13:16:52
#include<stdio.h>     
int main()     
{     
    int n,k;     
    while(scanf("%d %d",&n,&k)!=EOF)     
    {     
		int t=(n-k)/(k-1)+1;
		printf("%d\n",n+t);
    }     
    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