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 |
大家帮个忙啊帮我看一下这个程序有什么问题,怎么老是说wrong answer #include<iostream.h> int num[7],num1,shenyu1,shenyu2,jilu,zuihou; void main() { cin>>num[1]>>num[2]>>num[3]>>num[4]>>num[5]>>num[6]; while(num[1]!=0||num[2]!=0||num[3]!=0||num[4]!=0||num[5]!=0||num[6]!=0) { shenyu1=5*num[4]; if(num[3]%4!=0) shenyu2=7-2*(num[3]%4); if(num[2]>shenyu1+shenyu2) jilu=(num[2]-shenyu1-shenyu2+8)/9; num1=num[6]+num[5]+num[4]+jilu+(num[3]+3)/4; zuihou=(num1-num[6])*36-num[5]*25-num[4]*16-num[3]*9-num[2]*4; if(num[1]>zuihou) num1+=(num[1]-zuihou+35)/36; cout<<num1<<endl; cin>>num[1]>>num[2]>>num[3]>>num[4]>>num[5]>>num[6]; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator