結果

問題 No.2016 Countdown Divisors
ユーザー kakel-san
提出日時 2022-07-22 21:38:41
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 779 bytes
コンパイル時間 2,532 ms
コンパイル使用メモリ 111,708 KB
実行使用メモリ 30,496 KB
最終ジャッジ日時 2024-07-04 05:43:20
合計ジャッジ時間 4,802 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    static void Main()
    {
        var t = NN;
        var res = new int[t];
        for (var u = 0; u < t; ++u)
        {
            var n = NN;
            res[u] = CountDown(n);
        }
        WriteLine(string.Join("\n", res));
    }
    static int CountDown(int n)
    {
        switch(n)
        {
            case 1:
            case 3:
            case 4:
            case 5:
            case 7:
            case 8:
            return 1;
            default:
            return 2;
        }
    }
}
0