fork download
  1. local a
  2. a=1
  3. while a<101
  4. do
  5. local s,sum=2,1
  6. while s<(a/2)
  7. do
  8. if (math.mod(a,s)==0)
  9. then
  10. sum=sum+s
  11. end
  12. s=s+1
  13. end
  14. if(sum==a)
  15. then
  16. io.write(a)
  17. end
  18. a=a+1
  19. end
Success #stdin #stdout 0.01s 2540KB
stdin
Standard input is empty
stdout
124