# coding: utf-8 # ラムダ式テスト fizz_buzz = ->(i){ i % 3 == 0 ? (i % 5 == 0 ? "FizzBuzz" : "Fizz") : (i % 5 == 0 ? "Buzz" : i) } gets.to_i.times do |i| puts fizz_buzz[i + 1] end