#include <iostream>
using namespace std;
bool isDaffodils(int n)
{
int a, b, c;
a = n%10;
b = n/10%10;
c = n/100%10;
if(n==a*a*a+b*b*b+c*c*c)
return true;
else return false;
}
int main()
{
int n;
while(cin>>n&&n)
{
if(isDaffodils(n))
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
return 0;
}
水仙花数
最新推荐文章于 2024-02-24 08:00:00 发布