Skip to content

Instantly share code, notes, and snippets.

@mrk21
Last active August 29, 2015 13:58
Show Gist options
  • Save mrk21/10019445 to your computer and use it in GitHub Desktop.
Save mrk21/10019445 to your computer and use it in GitHub Desktop.
Rubyでワンライナー、剰余なしFizzBuzz
p (1..100).zip([*[nil]*2,:Fizz]*33,[*[nil]*4,:Buzz]*20,[*[nil]*14,:FizzBuzz]*6).map{|v|v.compact[-1]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment