fork download
  1. local next = next
  2. a = {[1]=1}
  3. b = {}
  4. c = 0
  5. for i=1,1000000 do
  6. if next(a) then
  7. c = c + 1
  8. else
  9. c = c + 2
  10. end
  11. end
  12. for i=1,1000000 do
  13. if next(b) then
  14. c = c + 1
  15. else
  16. c = c + 2
  17. end
  18. end
  19. print(c)
Success #stdin #stdout 0.67s 2540KB
stdin
Standard input is empty
stdout
3000000