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 |
貌似测试了200组数据了,但是还没没ac,请大神找找问题!#include<stdio.h> void main() { int sum,a,b,c,d,e,f,x,y,z; while (scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)){ if (a+b+c+d+e+f==0) break; sum=0; sum=d+e+f+c/4; if (c%4>0){ sum++; if ((b-5+(c%4-1)*2-5*d)/9>0) sum+=(b-5+(c%4-1)*2-5*d+8)/9;} else if ((b-5*d)/9>0) sum+=(b-5*d+8)/9; if (a>(sum*36-36*f-25*e-16*d-4*b-9*c)) { sum+=(a-((sum*36-36*f-25*e-16*d-4*b-9*c))+35)/36;} printf("%d\n",sum); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator