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 |
郁闷!为何WA,知道的发站内邮件给我,谢谢main(){ long int n,k; long int speed,readT,restT; long int i,j,h; long int time=0; scanf("%ld%ld",&n,&k); h=n; for(i=1;i<=k;i++){ scanf("%ld%ld%ld",&speed,&readT,&restT); while(n!=0){ if(speed*readT>=n){ time=time+n/speed; if(n/speed==0) time++; n=0;} else{ time=time+readT+restT; n=n-speed*readT;} } n=h; printf("%ld\n",time); time=0; } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator