結果
| 問題 | No.582 キャンディー・ボックス3 | 
| コンテスト | |
| ユーザー |  syunsuke | 
| 提出日時 | 2018-07-07 15:41:28 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 29 ms / 2,000 ms | 
| コード長 | 494 bytes | 
| コンパイル時間 | 258 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-07-04 15:09:13 | 
| 合計ジャッジ時間 | 1,344 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 17 | 
ソースコード
box=int(input())
list1=[]
line=input()
line=line.rstrip().split(" ")
win=0
for i in range(len(line)):
    if int(line[i])>=3:
        win=1
        break
    elif int(line[i])==0:
        pass
    elif int(line[i])==1 or int(line[i])==2:
        list1.append(int(line[i]))
c1=list1.count(1)
c2=list1.count(2)
if win==1:
    print("B")
elif c2>=2:
    print("B")
elif c2==1:
    if c1%2==1:
        print("A")
    else:
        print("B")
elif c1%2==0:
    print("B")
else:
    print("A")
    
            
            
            
        