#include <stdio.h> int main() { int a,b,c,s; for(s=100;s<=1000;s++) { a=s/100; b=s%100/10; c=s%10; //s=100*a+10*b+c; 画蛇添足 if(s==(a*a*a+b*b*b+c*c*c)) //a*a*a*a??? printf("%d",s); } return 0; }
[此贴子已经被作者于2016-4-25 21:59编辑过]