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 00430030 at 2004-12-30 12:58:52 on Problem 1316
#include<stdio.h>
#include<math.h>
int f(int a)
{
	int i,j,b;
for(i=0;;i++)
{
	a=a/10;
    if(a==0)  break;
}
for(j=0;j<=i;j++)
{
	b=b+a%10;
    a=a/10;
}
return b+a;
}
void main () 
{
	int a[10001],i,j,k;
		for(i=1;i<10001;i++)
			a[10000]=f(i);
p:		for(j=1;j<10001;j++)
{	    for(k=1;k<10001;k++)
				if(j==a[k])  continue;
				else goto l;
}
l:   printf("%d\n",j);    goto p;     
}

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