結果
| 問題 | No.582 キャンディー・ボックス3 | 
| コンテスト | |
| ユーザー |  夕叢霧香(ゆうむらきりか) | 
| 提出日時 | 2017-10-27 22:46:01 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 33 ms / 2,000 ms | 
| コード長 | 271 bytes | 
| コンパイル時間 | 93 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-11-22 10:52:21 | 
| 合計ジャッジ時間 | 1,524 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 17 | 
ソースコード
n = int(input())
c = sorted(filter(lambda x: x != 0, map(int, input().split())))
a_is_winning = False
if (len(c) % 2 == 1 and c[-1] == 1) or \
   (len(c) >= 2 and len(c) % 2 == 0 and c[-1] == 2 and c[-2] == 1):
    a_is_winning = True
print('A' if a_is_winning else 'B')
            
            
            
        