結果

問題 No.582 キャンディー・ボックス3
ユーザー GrayCoder
提出日時 2017-10-27 23:54:14
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 428 bytes
コンパイル時間 550 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-21 23:40:32
合計ジャッジ時間 1,412 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    C = tuple(map(int, input().split()))

    cnt = 0
    for i in C:
        if i >= 2:
            cnt += 1

    sumc = sum(C)
    maxc = max(C)
    if maxc == 1:
        if sumc % 2:
            ans = 'A'
        else:
            ans = 'B'
    elif maxc == 2:
        if cnt == 1:
            ans = 'A'
        else:
            ans = 'B'
    else:
        ans = 'B'

    print(ans)

main()
0