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

哪位高手看看哪有错呢?

Posted by 555 at 2004-12-11 23:48:59 on Problem 1663
#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:
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