| ||||||||||
| 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 | |||||||||
output limit exceed 啥意思#include <iostream.h>
int u[4]={0,5,3,1};
int v[4]={0,27,18,9};
void main()
{ int a,b,c,d,e,f,x,y,z;
for( ; ; ){
cout<<"please input the number of each box"<<endl;
cin>>f>>e>>d>>c>>b>>a;
if(a==0 && b==0 && c==0 && d==0 && e==0 && f==0) break;
x=a+b+c+(d+3)/4;
y=10*c+u[d%4];
if(e>y){
x=x+(e-y+17)/18;
z=(e-y)%36;
}
else{
z=11*b+20*c+v[d%4]-2*e;
}
if(f>z){
x=x+(f-z)/36+1;
}
cout<<x<<endl;
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator