結果
| 問題 | No.582 キャンディー・ボックス3 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-07-26 12:27:59 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 33 ms / 2,000 ms | 
| コード長 | 360 bytes | 
| コンパイル時間 | 78 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-07-02 06:25:38 | 
| 合計ジャッジ時間 | 1,438 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 17 | 
ソースコード
N = int(input())
C = list(map(int, input().split()))
one, two = 0, 0
for C_i in C:
    if C_i == 1:
        one += 1
        
    if C_i == 2:
        two += 1
        
    if C_i >= 3:
        print('B')
        exit()
if two >= 2:
    print('B')
    exit()
if (two == 1 and one % 2 == 1) or (two == 0 and one % 2 == 1):
    print('A')
else:
    print('B')
            
            
            
        