Files
python/C++课程/第九课2016年奥赛初赛试题解析/p67_4.cpp

15 lines
209 B
C++
Raw Normal View History

2025-08-30 18:35:01 +08:00
#include<iostream>
using namespace std;
int main() {
for(int n=100; n<1000; n++) {
int x,y,z;
x=n/100;
y=(n/10)%10;
z=n%10;
if (n==x*x*x+y*y*y+z*z*z) cout<<n<<endl;
}
return 0;
}