#include <bits/stdc++.h> using namespace std; int main() { for (int i = 100; i <= 999; ++ i) { int s = i, sum = 0; while (s) { sum += (s % 10) * (s % 10) * (s % 10); s /= 10; } if (sum == i) cout << i << '\n'; } return 0; }