#include<stdio.h>
int main(){
int a,b,c=0,x,y,z;
for(a=100;a<=999;a++)
{ x=a/100;
y=(a/10)%10;
z=a%10;
b=x*x*x+y*y*y+z*z*z;
if(a==b){
printf("%d\n",a);
c++;}
}
printf("%d\n",c);
return 0;}
原文:https://www.cnblogs.com/P201821430028/p/10838578.html