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:Re:大家要注意,不要直接除以,这样剩余烟头会没掉的。 Posted by:huhuhuhh at 2010-05-17 19:41:20 > #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 ; > } 2 5 这组数据会出错 正确答案是2 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator