結果

問題 No.582 キャンディー・ボックス3
ユーザー ああいい
提出日時 2021-12-05 21:55:59
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 339 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-07 08:48:16
合計ジャッジ時間 1,120 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
C = list(map(int,input().split()))
count = 0
count1 = 0
count2 = 0
for i in C:
    if i == 0:continue
    if i== 1:count1 += 1
    elif i == 2:count2 += 1
    else:count += 1
if count:print('B')
elif count2 == 1 and count1 % 2 == 1:
    print('A')
elif count2 == 0  and count1 % 2 == 1:
    print('A')
else:
    print('B')
0