結果
| 問題 | No.582 キャンディー・ボックス3 | 
| コンテスト | |
| ユーザー |  brthyyjp | 
| 提出日時 | 2021-10-18 10:59:19 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 38 ms / 2,000 ms | 
| コード長 | 380 bytes | 
| コンパイル時間 | 186 ms | 
| コンパイル使用メモリ | 82,432 KB | 
| 実行使用メモリ | 52,480 KB | 
| 最終ジャッジ日時 | 2024-09-19 04:33:34 | 
| 合計ジャッジ時間 | 1,581 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 17 | 
ソースコード
n = int(input())
C = list(map(int, input().split()))
c1 = 0
c2 = 0
total = 0
for c in C:
    if c == 1:
        c1 += 1
    if c == 2:
        c2 += 1
    if c > 0:
        total += 1
if c2 == 0:
    if c1 == total and c1%2 == 1:
        print('A')
    else:
        print('B')
else:
    if c2 == 1 and c1 == total-1 and c1%2 == 1:
        print('A')
    else:
        print('B')
            
            
            
        