LoginSignup
1
0

More than 5 years have passed since last update.

Ruby で FizzBuzz をがんばって短くしてみたが100バイトが限界だった件

Posted at
s,e=ARGV.map(&:to_i)
s.upto(e){|x|{15=>"FizzBuzz",5=>"Fizz",3=>"Buzz",1=>x}.find{|k,v|x%k==0&&p(v)}}

かろうじて100バイト。
達人は60バイトを下回るという。

恐るべし。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0