結果

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

ソースコード

diff #

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

box1 = box2 = box3 = 0

for c in C:
    if c == 1:
        box1 += 1
    elif c == 2:
        box2 += 1
    elif c > 2:
        box3 += 1

if box1 % 2 == 1 and box2 <= 1 and box3 == 0:
    print("A")
else:
    print("B")
0