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:各路神仙,看看我的哪里有错,是runtime error,谢谢你们了

Posted by ChenXiXing at 2005-03-27 00:13:41 on Problem 1663
In Reply To:各路神仙,看看我的哪里有错,是runtime error,谢谢你们了 Posted by:121211 at 2005-01-10 15:16:16
> #include<stdio.h>
> #include<math.h>
> void main(){
> 	int n,i,j,s;
> 	int a[5000][2];
> 	scanf("%d",&n);
> 	for(i=0;i<n;i++){
> 		for(j=0;j<2;j++){
> 			scanf("%d %d",&a[i][j]);
> 		}
> 	}
> 	for(i=0;i<n;i++){
> 		if(a[i][0]!=a[i][1]||a[i][0]!=a[i][1]+2) 
> 			printf("No Number\n");
> 		else{
> 		   if(a[i][0]==a[i][1]){
> 			  if(a[i][0]%2)  
> 				  s=2*a[i][0]-1;
> 		  	  else s=2*a[i][0];
> 		   }
> 			  else s=a[i][0]+a[i][1];
> 		     printf("%d",s);
> 		}
> 	}
> }

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