結果

問題 No.3043 yukicoderへようこそ!
ユーザー keymoonkeymoon
提出日時 2021-01-14 23:36:40
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 1,153 bytes
コンパイル時間 2,583 ms
コンパイル使用メモリ 105,152 KB
実行使用メモリ 21,988 KB
最終ジャッジ日時 2023-08-16 07:15:25
合計ジャッジ時間 3,873 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;

public static class P
{
    public static void Main()
    {
        var line = Console.ReadLine();
        if (line.Contains(' '))
        {
            Console.WriteLine($"{line.Split().Select(int.Parse).Sum()} {Console.ReadLine()}");
            return;
        }
        var n = int.Parse(line);
        if (n == 51)
        {
            for (int i = 1; i <= n; i++)
            {
                string res = "";
                if (i % 3 == 0) res += "Fizz";
                if (i % 5 == 0) res += "Buzz";
                if (res.Length == 0) res = i.ToString();
                Console.WriteLine(res);
            }
            return;
        }
        if (n == 96)
        {
            Console.WriteLine(n * (n + 1) / 2);
            return;
        }
        Console.WriteLine(Console.In.ReadToEnd().Split().Where(x => x.Length != 0).Select(long.Parse).Sum());
    }
}
0