#include <stdio.h>
int main(int argc, const char * argv[]) {
int reslut = 0;
for (int i = 100; i<1000; i++) {
int num =(i%10)*(i%10)*(i%10)+(i/10%10)*(i/10%10)*(i/10%10)+(i/100)*(i/100)*(i/100);
if ( num == i) {
printf("%d ",i);
reslut++;
}
}
printf("reslut = %d ",reslut);
return 0;
}
|
|