#include <iostream>
#include <cmath>
using namespace std;
double num;
int main() {
for (int a = 1; a < 10; a++) {
for (int b = 0; b < 10; b++) {
for (int c = 0; c < 10; c++) {
long int num = a * 100 + b * 10 + c;
if (num == a * a * a + b * b * b + c * c * c) {
cout << num << endl;
}
}
}
}
system("pause");
return 0;
}
水仙花数
最新推荐文章于 2024-02-24 08:00:00 发布