| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:各路神仙,看看我的哪里有错,是runtime error,谢谢你们了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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator