r/codegolf • • Oct 16 '20

Prime numbers in 63 bytes of ruby

s=[n=2];ARGV[0].to_i.times{n+=1until s.all?{|m|n%m>0};s<<p(n)}

7 Upvotes

18 comments sorted by