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; }
相关文章推荐
- 51Nod 1001 数组中和等于K的数对 And 1015 水仙花数
- 51Nod-1015 水仙花数【进制+查表搜索】
- 51Nod--1015 水仙花数
- 51nod 1015 水仙花数
- 51Nod-1015-水仙花数
- 51NOD 1015 水仙花数
- 51Nod 1015 水仙花数
- 51nod--1015 水仙花数(一级算法题)
- 水仙花数 51Nod - 1015
- 51Nod - 1015 水仙花数
- 51nod-【1015 水仙花数】
- 1015 水仙花数
- 51 nod 1015 水仙花数
- 51nod 1015 水仙花数
- 51nod 1015 水仙花数
- 【51Nod】1015 水仙花数
- 51Nod 1015 水仙花数
- 51NOD 1015 水仙花数
- 51nod 1015 水仙花数
- 南阳题目39-水仙花数