#include <stdio.h> int main() { int m,n,t,i,a,b,c,s; while(scanf("%d %d",&m,&n)!=EOF) {s=0; if(m>n) {t=m;m=n;n=t;} //判断输入的m,n的大小,并使得m<n for(i=m;i<=n;i++) { a=i/100; b=(i-100*a)/10; c=i-100*a-10*b; if(i==a*a*a+b*b*b+c*c*c) { if(s==0)printf("%d",i); else printf(" %d",i); s=s+1; } } if(s==0) printf("no"); printf("\n"); } return 0; }
04-26
04-26
04-26
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交