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}