public class shuiXianFlowers {
public int a; public int b; public shuiXianFlowers(int a, int b) { super(); this.a = a; this.b = b; } public int getA() { return a; } public void setA(int a) { this.a = a; } public int getB() { return b; } public void setB(int b) { this.b = b; } public void isShuiXianFloewr() { for (int i = this.getA(); i <= this.getB(); i++) { if (isEqual(i)) { System.out.print(i + ""); } } } public boolean isEqual(int num) { int num2 = num; int temp = 0; int a = 0; while (num > 0) { temp += num % 10; num = num / 10; a += temp * temp * temp; } if (a == num2) return true; else return false; }}