'commit'
This commit is contained in:
14
C++课程/第九课2016年奥赛初赛试题解析/p67_4.cpp
Normal file
14
C++课程/第九课2016年奥赛初赛试题解析/p67_4.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user