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 junshixiang at 2007-10-05 22:22:54 on Problem 1658
In Reply To: 麻烦帮我看一下,谢谢! Posted by:liuxiaolu at 2004-12-22 17:24:41
> #include<stdio.h>
> void main(){
> 	int n,i,j;
> 	scanf("%d\n",&n);
> 	while(n>=0&&n<=20){
> 		for(j=0;j<n;j++){
> 			int a[5];
> 		    for(i=0;i<4;i++){
> 			    scanf("%d ",&a[i]);
> 		        for(i=0;i<2;i++){
> 			    	if(a[i+1]*2==a[i]+a[i+2]) a[5]=2*a[4]-a[3];
> 				    if(a[i+2]/a[i+1]==a[i+1]/a[i]) a[5]=a[4]*a[4]/a[3];
> 				}
> 			}
> 			for(i=0;i<=4;i++){
> 		    	printf("%d ",a[i]);
> 				printf("\n");
> 			}
> 	    	
> 		}		
> 	}
> }
> 
> 		    
> 
> 

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