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 |
哪位高手看看哪有错呢?#include<stdio.h> #include<math.h> void main() { int ou1[2500],ou2[2500],ji1[2500],ji2[2500],i,a,b,num; for(i=0;i<=2500;i++) { ou1[0]=0;ou2[0]=0; ou2[i+1]=ou1[i]; ou1[i+1]=2+ou2[i]; ji1[0]=1;ji2[0]=1; ji1[i]=ou1[i]+1; ji2[i]=ou2[i]+1; } scanf("%d", &num); while(num-->0) { scanf("%d %d",&a,&b); if((a=ou1[i])&&(b=ou2[i])==1) printf("%d\n",2*i); else if((a=ji1[i])&&(b=ji2[i])==1) printf("%d\n",(2*i+1)); else printf("No Number\n"); scanf("%d", &num); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator