Time Limit: 2000/1000 MS
(Java/Others) Memory Limit: 65536/32768 K
(Java/Others)
Total Submission(s): 91418 Accepted
Submission(s): 27061
1 #include<stdio.h> 2 double buf[1005]; 3 int main() 4 { 5 int m, n, count; 6 while(scanf("%d%d", &m, &n) == 2) 7 { 8 count = 0; 9 for(int i = m; i <= n; i++) 10 { 11 int x, y, z; 12 z = i % 10; 13 y = i/10%10; 14 x = i/100; 15 if(i == x*x*x+y*y*y+z*z*z) 16 { 17 if(count) 18 printf(" "); 19 count++; 20 printf("%d", i); 21 } 22 } 23 if(count == 0) 24 printf("no\n"); 25 else 26 printf("\n"); 27 } 28 return 0; 29 }
原文:http://www.cnblogs.com/la0bei/p/3649735.html