3 条题解
- 1
信息
- ID
- 63
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 7
- 标签
- (无)
- 递交数
- 2679
- 已通过
- 706
- 上传者
#include<iostream> #include<cmath> using namespace std; //判断水仙花数
int main(){ int n; cin >> n; while(n){ int ge,shi,bai; bai=n/100; ge=n%10; shi=(n%100-ge)/10; if(pow(ge,3)+pow(shi,3)+pow(bai,3)==n) cout << "Yes" << endl; else cout << "No" << endl; cin >> n; } return 0; }