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 |
Re:大家要注意,不要直接除以,这样剩余烟头会没掉的。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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator