class Fixnum
alias_method :orig_to_s, :to_s
def to_s
return "FizzBuzz" if self % 15 == 0
return "Fizz" if self % 3 == 0
return "Buzz" if self % 5 == 0
return self.orig_to_s()
end
end
1.upto(100) do |n|
puts n
end
Y2xhc3MgRml4bnVtCiAgICBhbGlhc19tZXRob2QgOm9yaWdfdG9fcywgOnRvX3MKICAgIGRlZiB0b19zCiAgICAgICAgcmV0dXJuICJGaXp6QnV6eiIgaWYgc2VsZiAlIDE1ID09IDAKICAgICAgICByZXR1cm4gIkZpenoiIGlmIHNlbGYgJSAzID09IDAKICAgICAgICByZXR1cm4gIkJ1enoiIGlmIHNlbGYgJSA1ID09IDAKICAgICAgICByZXR1cm4gc2VsZi5vcmlnX3RvX3MoKQogICAgZW5kCmVuZAoKMS51cHRvKDEwMCkgZG8gfG58CiAgICBwdXRzIG4KZW5k