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> #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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator