Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

输出的太多了

Posted by cpp051200448242 at 2006-02-23 07:14:05 on Problem 1017
In Reply To:output limit exceed 啥意思 Posted by:cpp0600548054 at 2006-02-23 00:52:11
> #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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator