fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int i,j,k,h;
  6. j=10000;
  7. h=0;
  8. for(i=2; i<=j; i++){
  9. h=0;
  10. for(k=1; k<i; k++){
  11. if(i%k==0){
  12. h=h+k;
  13. // printf("%d\n",h);
  14.  
  15. }
  16. }
  17. if(h==i){
  18. printf("%d\n",h);
  19. }
  20. }
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0.19s 5316KB
stdin
Standard input is empty
stdout
6
28
496
8128