17 条题解
-
1
做题思路:先分离位数,再求数值,最后匹配
#include <bits/stdc++.h> using namespace std; int main(){ int a,ge,shi,bai; cin >> a; ge = a % 10; shi = a % 100 / 10; bai = a / 100; int pow_ans = pow(ge,3) + pow(shi,3) + pow(bai,3); if( pow_ans == a){ cout << "YES"; } else{ cout << "NO"; } return 0; }
信息
- ID
- 884
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 4
- 标签
- 递交数
- 1201
- 已通过
- 529
- 上传者