FizzFizz by mitchs

1.upto(?d){|N|def f p=3,m=N
m%p>0?0:-~f(p,m/p)end
puts''<(r='Fizz'*f+'Buzz'*f(5))?r:N}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page