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 qwer34558767 at 2011-05-27 12:52:06 on Problem 1316
#include <stdio.h>
#define	N	10000
main()
{
	int a=0,i=0;
	int m[N];
	for(i=0;i<N;i++)
	{
		m[i]=i;
	}
	for(a=1;a<=N;a++)
	{	
		i=a+a/1000+(a/100)%10+(a/10)%10+a%10;
		if(m[i]!=0)
		{
			while(i<=N)
			{
				m[i]=0;
				i=i+i/1000+(i/100)%10+(i/10)%10+i%10;
			}
		}
	}
	for(i=0;i<10000;i++)
	{
		if(m[i]!=0)
		{
			printf("%d\n",m[i]);
	
		}
	}
	return 0;
}
c-free运行结果是正确的,但是提交就是错误

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