Run ID:102649

提交时间:2024-12-22 13:36:16

#include <iostream> #include <cmath> using namespace std; int main() { for (int num = 100; num < 1000; num++) { int hundreds = num / 100; int tens = (num / 10) % 10; int units = num % 10; if (num == pow(hundreds, 3) + pow(tens, 3) + pow(units, 3)) { cout << num << " "; } } return 0; }