結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー itok217itok217
提出日時 2017-04-09 16:04:58
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 57 ms / 5,000 ms
コード長 431 bytes
コンパイル時間 2,064 ms
コンパイル使用メモリ 97,716 KB
実行使用メモリ 22,836 KB
最終ジャッジ日時 2023-09-25 01:22:17
合計ジャッジ時間 2,912 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
22,836 KB
testcase_01 AC 57 ms
22,776 KB
testcase_02 AC 56 ms
20,780 KB
testcase_03 AC 56 ms
22,776 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program {
   static void Main() {
      int n = int.Parse(Console.ReadLine());
      for (int i = 1; i <= n; i++) {
         if (i % 15 == 0) {
            Console.WriteLine("FizzBuzz");
         } else if (i % 3 == 0) {
            Console.WriteLine("Fizz");
         } else if (i % 5 == 0) {
            Console.WriteLine("Buzz");
         } else {
            Console.WriteLine(i);
         }
      }
   }
}
0