結果

問題 No.582 キャンディー・ボックス3
ユーザー 310icecrystal310icecrystal
提出日時 2023-06-28 02:13:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 459 bytes
コンパイル時間 929 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 71,576 KB
最終ジャッジ日時 2023-09-18 01:11:41
合計ジャッジ時間 3,478 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,288 KB
testcase_01 AC 71 ms
71,308 KB
testcase_02 AC 73 ms
71,448 KB
testcase_03 AC 69 ms
71,204 KB
testcase_04 AC 68 ms
71,184 KB
testcase_05 AC 69 ms
71,528 KB
testcase_06 AC 68 ms
71,316 KB
testcase_07 AC 70 ms
71,172 KB
testcase_08 AC 70 ms
71,356 KB
testcase_09 WA -
testcase_10 AC 67 ms
71,312 KB
testcase_11 AC 66 ms
71,212 KB
testcase_12 AC 68 ms
71,312 KB
testcase_13 WA -
testcase_14 AC 70 ms
71,260 KB
testcase_15 AC 68 ms
71,172 KB
testcase_16 AC 69 ms
71,248 KB
testcase_17 AC 69 ms
71,576 KB
testcase_18 AC 70 ms
71,244 KB
testcase_19 AC 71 ms
71,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
C = list(map(int,input().split()))

one_count = 0
more_than_two_count = 0
for c in C:
    if c == 1:
        one_count += 1
    elif c >= 2:
        more_than_two_count += 1

if more_than_two_count >= 2:
    print("B")
elif more_than_two_count == 1:
    if max(C) >= 3:
        print("B")
    elif one_count == 1:
        print("A")
    else:
        print("B")
else:
    if one_count % 2 == 1:
        print("A")
    else:
        print("B")
0