結果

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

ソースコード

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 one_count == 1:
        print("A")
    else:
        print("B")
else:
    if one_count % 2 == 1:
        print("A")
    else:
        print("B")
0