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 frkstyc at 2005-06-12 22:05:25 on Problem 1658
In Reply To:到底哪里错了:( Posted by:cpp050500448044 at 2005-06-12 22:02:29
> #include<iostream.h>
> 
> int main(){
> 	int a,answer;
> 	cin>>a;
> 	for(int i=0;i<a;i++){
> 		int num[4];
> 		for(int j=0;j<4;j++)
> 			cin>>num[j];
> 		if(num[3]-num[2]==num[2]-num[1]&&num[2]-num[1]==num[1]-num[0])
> 			answer=2*num[3]-num[2];
                  else
> 		answer=num[3]*num[3]/num[2];
> 		cout<<num[0]<<" "<<num[1]<<" "<<num[2]<<" "<<num[3]<<" "<<answer<<endl;
> 	}
> 	return 0;
> }

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