class ShuiXianHua { public static void main(String[] args) { for(int i =100;i < 1000; i++){ int j1=i/100; int j2=(i-j1*100)/10; int j3=i%10; if(i==j1*j1*j1+j2*j2*j2+j3*j3*j3){ System.out.println(i); } } } }
本文共 270 字,大约阅读时间需要 1 分钟。
class ShuiXianHua { public static void main(String[] args) { for(int i =100;i < 1000; i++){ int j1=i/100; int j2=(i-j1*100)/10; int j3=i%10; if(i==j1*j1*j1+j2*j2*j2+j3*j3*j3){ System.out.println(i); } } } }
转载于:https://blog.51cto.com/9815936/1600434