#include <iostream>
#include <conio.h>
using namespace std;
#define TRIMP(x) (x)*(x)*(x)
int main()
{
cout<<"水仙花数有:"<<endl;
int b, c, d, tmp;
b = c = d = 0;
for(int n = 100;
n<=999;
++n)
{
b = TRIMP(n/100);
c = TRIMP((n%100)/10);
d = TRIMP((n%100)%10);
tmp = b + c + d;
if(n == tmp)
cout << n << endl;
}
getch();
return 0;
}