1 #include<iostream> 2 #include<ctime> 3 using namespace std; 4 int main() 5 { 6 for (int i = 100; i < 1000; i++) { 7 int bai = i / 100; 8 int shi = (i / 10) % 10; 9 int ge = i % 10; 10 if (bai * bai * bai + shi * shi * shi + ge * ge * ge == i) { 11 cout << i << endl; 12 } 13 } 14 15 system("pause"); 16 return 0; 17 }