include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a;
b = a % 10;
c = a / 10 % 10;
d = a / 100 % 10;
if (b * b * b + c * c * c + d * d * d == a) {
cout << "YES";
} else {
cout << "NO";
}
return 0;
}
using namespace std;
int main() {
int a, b, c, d;
cin >> a;
b = a % 10;
c = a / 10 % 10;
d = a / 100 % 10;
if (b * b * b + c * c * c + d * d * d == a) {
cout << "YES";
} else {
cout << "NO";
}
return 0;
}
登录后即可回复本帖,与出题人和同学一起讨论。
登录