結果

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

ソースコード

diff #

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

    if N == 1:
        if C[0] == 1:
            ans = 'A'
        if C[0] == 0 or C[0] % 2:
            ans = 'B'
        else:
            ans = 'A'
    else:
        i = 0
        for j in C:
            i += j % 2

        if i % 2:
            ans = 'A'
        else:
            ans = 'B'

    print(ans)

main()
0