标签:des style http color strong os
Description
Input
Output
Sample Output
1 3 5 7 9 20 31 42 53 64 | | <-- a lot more numbers | 9903 9914 9925 9927 9938 9949 9960 9971 9982 9993
#include<iostream> #include<cstring> using namespace std; int shzi(int k) { int s; s=k; while(s!=0) { k=k+s%10; s=s/10; } return k;} int a[10001],n=10000; int main() { memset(a,0,sizeof(a)); int i,k; for(i=1;i<=10000;i++) { k=shzi(i); if(k<=10000) a[k]=1; } for(i=1;i<=10000;i++) if(!a[i]) cout<<i<<endl; return 0; }
G - Self Numbers(2.2.1),布布扣,bubuko.com
标签:des style http color strong os
原文地址:http://blog.csdn.net/rememberautumn/article/details/37757607