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 |
我也暴利0ms#include<cstdio> #include<cmath> int s; bool b[10010]; int d(int n) { s=n; int alen=(int)log10((double)n)+1,j;//求长度 for(j=0;j<alen;j++)//求每位数字 s+=int(n/pow(10,j))%10; return s; } int main() { int i,k,a; for(i=1;i<10000;i++) { b[d(i)]=true; } for(i=1;i<10000;i++) if(b[i]==0)printf("%d\n",i); //getchar(); } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator