You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
187 B
14 lines
187 B
2 years ago
|
#include <iostream>
|
||
|
using namespace std;
|
||
|
int main() {
|
||
|
int n;
|
||
|
cin>>n;
|
||
|
int x,y,z;
|
||
|
x=n/100;
|
||
|
y=(n/10)%10;
|
||
|
z=n%10;
|
||
|
if (n==x*x*x+y*y*y+z*z*z) cout<<"YES";
|
||
|
else cout<<"NO";
|
||
|
return 0;
|
||
|
}
|