結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー 富浜富浜
提出日時 2015-04-06 15:42:38
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 56 ms / 5,000 ms
コード長 627 bytes
コンパイル時間 2,028 ms
コンパイル使用メモリ 104,000 KB
実行使用メモリ 22,636 KB
最終ジャッジ日時 2023-09-17 06:12:09
合計ジャッジ時間 2,708 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

using System;

namespace OJcsharp
{
    class Program
    {
        static void Main(string[] args)
        {
            int m = int.Parse(Console.ReadLine());
            for (int n = 1; n <= m; n++)
            {
                if (n % 3 != 0 && n % 5 != 0)
                {
                    Console.Write(n);
                }
                if (n % 3 == 0)
                {
                    Console.Write("Fizz");
                }
                if (n % 5 == 0)
                {
                    Console.Write("Buzz");
                }
                Console.WriteLine();
            }
        }
    }
}
0