#include <cmath>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
for (int i = 100; i < 1000; i++) {
int a = i / 100;
int b = i % 100 / 10;
int c = i % 10;
// if (pow(a, 3) + pow(b, 3) + pow(c, 3) == i) - 不可以,不知道为什么
if (a * a * a + b * b * b + c * c * c == i) {
cout << i << endl;
}
}
return 0;
}

京公网安备 11010502036488号