You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
195 B

#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;
}