a040.
阿姆斯壯數
| From: [36.227.80.119] |
發表日期
:
2014-07-06 18:40
#include<iostream>
using namespace std;
int main()
{
int list[20]={1,2,3,4,5,6,7,8,9,153,370,371,407,1634,8208,9474,54748,92727,93084,548834};
int in1,in2,s;
while(cin>>in1>>in2){s=0;
for(int x=0;x<20;x++){
if(list[x]>=in1 && list[x]<=in2){
cout<<list[x]<<" ";
s=1;
}
if(x>=19)
cout<<endl;
}
if(s==0){
cout<<"none"<<endl;
}
}
}