| ||||||||||
| 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 | |||||||||
各位大虾,为什么我的program出问题了#include "Stdio.h"
int main(void)
{
unsigned int i,k,x,y;
int a[5001];
scanf("%d",&k);
for(i=0;i<=k-1;i++)
{
a[i]=-1;
scanf("%d%d",&x,&y);
if (x==y)
{
if (x%2==1)
a[i]=x+y+1;
else a[i]=x+y;
}
else if (x==y+2)
{
if (x%2==1)
a[i]=x+y+1;
else a[i]=x+y;
}
}
for(i=0;i<=k-1;i++)
{
if (a[i]!=-1)
printf("%d\n",a[i]);
else printf("No Number\n");
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator