import scala.io.StdIn.{readLine, readInt} @main def yuki9002(): Unit = def fizzbuzz(i: Int): String = (i % 3, i % 5) match { case (0, 0) => "FizzBuzz" case (0, _) => "Fizz" case (_, 0) => "Buzz" case _ => i.toString } val n = readInt val k = List.unfold(1) { current => if current > n then None else Some((fizzbuzz(current), current + 1)) } k.foreach(println)