1 回答
car
TA贡献184条经验 获得超33个赞
public class MainApp { public static void main(String[] args) { // 100-1000 for (int i = 100; i < 1000; ++i) { int a = i / 100; int b = i / 10 % 10; int c = i % 10; if (a * a * a + b * b * b + c * c * c == i) { System.out.println(i); } } } }
添加回答
举报
0/150
提交
取消