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 |
友情提示:ceiling(N/S)可以用(N+S-1)/S得到,并且K根本不用读,上代码main(){ int n,s,t,r,d; scanf("%d%*d",&n); while(scanf("%d%d%d",&s,&t,&r)>0){ d=(n+s-1)/s; printf("%d\n",d+(d+t-1)/t*r-r); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator