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