#include <stdio.h>
int main() {
int n,x,y,z;
while(scanf("%d",&n)&&n!=0) {
x=n/100;
y=n%100/10;
z=n%100%10;
if(x*x*x+y*y*y+z*z*z==n) printf("Yes\n");
else printf("No\n");
}
}
转载于:https://www.cnblogs.com/Tristan-Adams/p/8885820.html
#include <stdio.h>
int main() {
int n,x,y,z;
while(scanf("%d",&n)&&n!=0) {
x=n/100;
y=n%100/10;
z=n%100%10;
if(x*x*x+y*y*y+z*z*z==n) printf("Yes\n");
else printf("No\n");
}
}
转载于:https://www.cnblogs.com/Tristan-Adams/p/8885820.html