結果

問題 No.582 キャンディー・ボックス3
ユーザー 310icecrystal
提出日時 2023-06-28 02:13:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 459 bytes
コンパイル時間 718 ms
コンパイル使用メモリ 82,344 KB
実行使用メモリ 53,788 KB
最終ジャッジ日時 2024-07-04 18:15:40
合計ジャッジ時間 1,648 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 2
権限があれば一括ダウンロードができます

ソースコード

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