結果

問題 No.582 キャンディー・ボックス3
コンテスト
ユーザー brthyyjp
提出日時 2021-10-18 10:57:51
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 329 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 247 ms
コンパイル使用メモリ 95,980 KB
実行使用メモリ 79,104 KB
最終ジャッジ日時 2026-08-30 19:20:19
合計ジャッジ時間 2,885 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())
C = list(map(int, input().split()))
c1 = 0
c2 = 0
for c in C:
    if c == 1:
        c1 += 1
    if c == 2:
        c2 += 1
if c2 == 0:
    if c1 == n and c1%2 == 1:
        print('A')
    else:
        print('B')
else:
    if c2 == 1 and c1 == n-1 and c1%2 == 1:
        print('A')
    else:
        print('B')
0