using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp14 { class Program { public static string result; static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; ++i) { if (i % 3 == 0 && i % 5 == 0) { result = "FizzBuzz"; } else if (i % 5 == 0) { result = "Buzz"; } else if (i % 3 == 0) { result = "Fizz"; } else { result = "はずれ"; } if (result !="はずれ") { Console.WriteLine(result); } else { Console.WriteLine(i); } } Console.ReadLine(); } } }