截取个位、十位、百位错了
private static void shuixianhua(int a) {
for (int i = 1; i < a; i++) {
int ge = i % 100 % 10;
int shi = i % 100 / 10;
int bai = i / 100;
if (ge * ge * ge + shi * shi * shi + bai * bai * bai == i) {
System.out.println(i);
}
// System.out.println(i + "-->" + ge + "-->" + shi + "-->" + bai);
}
}
报什么错,这逻辑应该是可以算出来才是