結果

問題 No.582 キャンディー・ボックス3
ユーザー 310icecrystal310icecrystal
提出日時 2023-06-28 02:12:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 418 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 71,632 KB
最終ジャッジ日時 2023-09-18 01:09:43
合計ジャッジ時間 3,026 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,464 KB
testcase_01 WA -
testcase_02 AC 70 ms
71,412 KB
testcase_03 AC 70 ms
71,104 KB
testcase_04 AC 70 ms
71,460 KB
testcase_05 AC 70 ms
71,520 KB
testcase_06 AC 71 ms
71,104 KB
testcase_07 WA -
testcase_08 AC 71 ms
71,352 KB
testcase_09 WA -
testcase_10 AC 71 ms
71,244 KB
testcase_11 AC 71 ms
71,108 KB
testcase_12 AC 71 ms
71,240 KB
testcase_13 WA -
testcase_14 AC 71 ms
71,296 KB
testcase_15 AC 70 ms
71,432 KB
testcase_16 AC 72 ms
71,252 KB
testcase_17 AC 70 ms
71,348 KB
testcase_18 AC 69 ms
71,084 KB
testcase_19 AC 70 ms
71,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

one_count = 0
more_than_two_count = 0
for c in C:
    if c == 1:
        one_count += 1
    elif c >= 2:
        more_than_two_count += 1

if more_than_two_count >= 2:
    print("B")
elif more_than_two_count == 1:
    if one_count == 1:
        print("A")
    else:
        print("B")
else:
    if one_count % 2 == 1:
        print("A")
    else:
        print("B")
0