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

Re:大家帮个忙啊

Posted by guk at 2006-02-26 09:36:13 on Problem 1017
In Reply To:大家帮个忙啊 Posted by:cpp00548309 at 2006-02-25 17:09:43
> 帮我看一下这个程序有什么问题,怎么老是说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:
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