r/codegolf • u/binarycat64 • 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
r/codegolf • u/binarycat64 • Oct 16 '20
s=[n=2];ARGV[0].to_i.times{n+=1until s.all?{|m|n%m>0};s<<p(n)}
View all comments
Show parent comment
1
u/DutchOfBurdock Oct 16 '20
Don't ask me, I suck at maths. I almost always have a scientific calculator sat next to me coding. Just fun to do these things.