/**
* @(#)shuixianhua.java
*
*
* @author
* @version 1.00 2013/4/17
*/
public class shuixianhua {
public static void main (String[] args) {
int sum=0;
for(int i=100;i<1000;i++){
if(f(i%10)+f((i%100-i%10)/10)+f(i/100)==i){
System.out.println (i);
sum++;
}
}
System.out.println ("共有"+sum+"個水仙花數");
}
public static int f(int a){
return a*a*a;
}
}