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:why wrong?帮我看看吧In Reply To:why wrong?帮我看看吧 Posted by:cpp0600548204 at 2006-02-25 11:11:43 > //运行时没问题,可一提交就出错……为什么? > > > #include<iostream.h> > void main(){ > int T[4]={0,5,3,1},S[4]={0,7,6,5}; > int A0,A1,A2,A3,A4,A5,a,b,c,d,e,f,x,y,sum; > while(1){ > cin>>A0>>A1>>A2>>A3>>A4>>A5; > if(A0==0&&A1==0&&A2==0&&A3==0&&A4==0&&A5==0) > break; > f=A5,e=A4,d=A3,c=(A2+3)/4; > y=5*A3+T[A2%4]; > if(A1<y){ > x=11*A4+S[A2%4]+(y-A1)*2; > if(A0<x) sum=f+e+d+c; > else{ > a=((A0-x)+35)/36; > sum=f+e+d+c+a;} > } > else{ > b=((A1-y)+8)/9; > x=11*A4+S[A2%4]+(36-(A1-y)%9*4); > if(A0<x) sum=f+e+d+c+b; > else{ > a=((A0-x)+35)/36; > sum=f+e+d+c+b+a;} > } > cout<<sum<<endl;} > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator