結果

問題 No.582 キャンディー・ボックス3
ユーザー NoNo
提出日時 2018-01-25 00:04:57
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 623 bytes
コンパイル時間 2,253 ms
コンパイル使用メモリ 103,768 KB
実行使用メモリ 23,728 KB
最終ジャッジ日時 2023-08-27 02:30:55
合計ジャッジ時間 4,174 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
21,656 KB
testcase_01 AC 58 ms
21,632 KB
testcase_02 AC 58 ms
21,640 KB
testcase_03 AC 56 ms
23,652 KB
testcase_04 AC 56 ms
21,660 KB
testcase_05 AC 57 ms
23,716 KB
testcase_06 AC 56 ms
23,664 KB
testcase_07 AC 56 ms
21,628 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 59 ms
21,520 KB
testcase_11 AC 56 ms
21,548 KB
testcase_12 AC 56 ms
21,580 KB
testcase_13 AC 57 ms
21,712 KB
testcase_14 AC 59 ms
19,580 KB
testcase_15 AC 63 ms
19,688 KB
testcase_16 WA -
testcase_17 AC 62 ms
19,632 KB
testcase_18 AC 65 ms
21,896 KB
testcase_19 AC 62 ms
21,740 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.Linq;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            var c = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();

            int z = c.Count(x => x == 0);
            int o = c.Count(x => x == 1);
            int t = c.Count(x => x == 2);
            n -= 0;

            string a = "";
            if (o == n && n % 2 == 1) a = "A";
            else if (o == n - 1 && t == 1 && n % 2 == 0) a = "A";
            else a = "B";

            Console.WriteLine(a);
        }
    }
}
0