結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー 3gin30
提出日時 2020-02-14 20:51:01
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 532 bytes
コンパイル時間 973 ms
コンパイル使用メモリ 109,048 KB
実行使用メモリ 23,768 KB
最終ジャッジ日時 2024-10-06 09:49:11
合計ジャッジ時間 1,523 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
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