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.
18 lines
223 B
18 lines
223 B
2 years ago
|
#include<bits/stdc++.h>
|
||
|
using namespace std;
|
||
|
int main() {
|
||
|
int b, s, g, n, sum;
|
||
|
scanf("%d", &n);
|
||
|
b=n/100;
|
||
|
s=n/10%10;
|
||
|
g=n%10;
|
||
|
sum=b*b*b+s*s*s+g*g*g;
|
||
|
if(sum==n)
|
||
|
printf("Yes\n");
|
||
|
else
|
||
|
printf("No\n");
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
|