fork download
  1. #include <stdio.h>
  2. #include<math.h>
  3. int main(void) {
  4. int i,g,s,b;
  5. for(i=100;i<1000;i++){
  6. g=i%10;
  7. s=i%100/10;
  8. b=i/100;
  9. if(i==pow(g,3)+pow(s,3)+pow(b,3)){
  10. printf("%-4d",i);}
  11.  
  12. }
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
153 370 371 407