您的位置:首页 > 其它

1015 水仙花数

2016-08-10 10:39 211 查看

1015 水仙花数

#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <queue>
#include <stack>
typedef long long ll;
using namespace std;
int main(){

/*for(int i=1 ;i<+9 ;i++){
for (int j=0; j<=9; j++){
for(int k=0 ; k<=9;k++){
if(i*i*i+j*j*j+k*k*k==i*100+j*10+k){
cout<<i*100+j*10+k<<endl;}
}
}
}
*/

int n;
cin>>n;
if(n<=153)cout<<153<<endl;
else if (n>153&&n<=370)cout<<370<<endl;
else if (n==371)cout<<371<<endl;
else if (n>371&&n<=407)cout<<407<<endl;
else cout<<1634<<endl;

return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: