5 ms·
Couldn't get it to run but here is my best in ruby: 1.upto(100).each {|x|s="#{'Fizz' if x%3 == 0}#{'Buzz' if x%5 == 0}";s=="" ? p(x): p(s)}
by pg_bot 14y ago
Couldn't get it to run but here is my best in ruby:
1.upto(100).each {|x|s="#{'Fizz' if x%3 == 0}#{'Buzz' if x%5 == 0}";s=="" ? p(x): p(s)}