153 154 0
Yes No
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main(int argc, char* argv[])
{
int
n,a,b,c;
cin>>n;
while(n!=0)
{
a=n/100;
b=(n-100*a)/10;
c=n-100*a-10*b;
if(n==a*a*a+b*b*b+c*c*c)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
cin>>n;
}
return
0;
}
原文:http://www.cnblogs.com/52Cyan/p/3676543.html