結果

問題 No.582 キャンディー・ボックス3
コンテスト
ユーザー 👑 rin204
提出日時 2022-01-19 23:18:10
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 23 ms / 2,000 ms
+ 949µs
コード長 219 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 62 ms
コンパイル使用メモリ 82,944 KB
実行使用メモリ 56,252 KB
最終ジャッジ日時 2026-09-28 15:48:22
合計ジャッジ時間 1,896 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())
C = list(map(int, input().split()))
A = []
for c in C:
    if c != 0:
        A.append(c)
    else:
        n -= 1
tot = sum(A)
if tot >= n + 2 or tot % 2 == 0:
    print("B")
else:
    print("A")
    
0