結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー e7a894e7a894
提出日時 2018-05-08 14:17:11
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 62 ms / 5,000 ms
コード長 396 bytes
コンパイル時間 1,825 ms
コンパイル使用メモリ 65,968 KB
実行使用メモリ 23,896 KB
最終ジャッジ日時 2023-09-10 11:03:56
合計ジャッジ時間 1,634 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
23,896 KB
testcase_01 AC 62 ms
21,960 KB
testcase_02 AC 62 ms
21,856 KB
testcase_03 AC 62 ms
21,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Linq;
using System.Text;

class Program
{
    public static void Main(string[] args)
    {
        Console.Write(
            Enumerable.Range(1, int.Parse(Console.ReadLine()))
                .Select(x => x % 15 == 0 ? "FizzBuzz" : x % 3 == 0 ? "Fizz" : x % 5 == 0 ? "Buzz" : $"{x}")
                .Aggregate(new StringBuilder(), (a, b) => a.AppendLine(b)));
    }
}
0