public static void main(String[] args) {
int count = 0;
for (int a = 100; a < 1000; a++) {
int g=a%10;
int s=a/10%10;
int b=a/100;
if (a==g*g*g+s*s*s+b*b*b) {
count++;
System.out.println("水仙花数为: " + a );
}
}
System.out.println("水仙花个数为: " + count );;
}