結果

問題 No.3043 yukicoderへようこそ!
ユーザー keymoonkeymoon
提出日時 2021-01-14 23:39:39
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 1,222 bytes
コンパイル時間 4,001 ms
コンパイル使用メモリ 106,140 KB
実行使用メモリ 23,920 KB
最終ジャッジ日時 2023-08-16 07:18:58
合計ジャッジ時間 3,256 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
23,828 KB
testcase_01 AC 56 ms
21,540 KB
testcase_02 AC 56 ms
21,540 KB
testcase_03 AC 55 ms
21,512 KB
testcase_04 AC 65 ms
23,920 KB
testcase_05 AC 64 ms
23,832 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();
        int n;
        if (!int.TryParse(line, out n))
        {
            if (char.IsDigit(line[0])) Console.WriteLine($"{line.Split().Select(int.Parse).Sum()} {Console.ReadLine()}");
            else Console.WriteLine("Hello World!");
            return;
        }
        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