結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー 3gin303gin30
提出日時 2020-02-14 20:51:01
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 532 bytes
コンパイル時間 857 ms
コンパイル使用メモリ 104,448 KB
実行使用メモリ 17,792 KB
最終ジャッジ日時 2024-04-16 01:10:29
合計ジャッジ時間 1,392 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
17,664 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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++)
        {
            
            Console.Write(fizzbuzz(i));
            
        }
        String fizzbuzz (int x)
        {
            if(x % 3 == 0 & x % 5 == 0)
            { return ("fizzBuzz"); }
            if(x % 3 == 0)
            { return ("fizz"); }
            if (x % 5 == 0)
            { return ("Buzz"); }
            return x.ToString();
        }
    }

}
0