defmodule Main do def fz(x) do case rem(x, 15) do 0 -> "FizzBuzz" 3 -> "Fizz" 5 -> "Buzz" 6 -> "Fizz" 9 -> "Fizz" 10 -> "Buzz" 12 -> "Fizz" _ -> x |> Integer.to_string end end def main do n = IO.gets("") |> String.trim |> String.to_integer IO.puts 1..n |> Enum.map(fn(x) -> fz(x) end) |> Enum.join("\n") end end