fork download
  1. local read, write = io.read, io.write
  2. local b=2
  3. local n, sum = 1,0
  4. while n <= 10000 do
  5. sum = 0
  6. while b <= n do
  7. if b%n == 0 then
  8. sum = sum + b
  9. end
  10. b = b+1
  11. end
  12.  
  13. if sum == n then write(n)
  14. end
  15. end
Time limit exceeded #stdin #stdout 5s 2536KB
stdin
stdout
Standard output is empty