#include<stdio.h>
int main() {
for (int a = 1; a < 9; a++) {
for (int b = 0; b < 9; b++) {
for (int c = 0; c < 9; c++) {
int out = a * 100 + b * 10 + c;
if (a * a * a + b * b * b + c * c * c ==out) {
printf("%d\n",out);
}
}
}
}
return 0;
}
水仙花数(非通常方法)
最新推荐文章于 2024-09-03 16:36:34 发布