結果

問題 No.582 キャンディー・ボックス3
ユーザー syunsuke
提出日時 2018-07-07 15:40:31
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 494 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-04 15:04:40
合計ジャッジ時間 1,777 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 14 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

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("B")
    else:
        print("A")
elif c1%2==0:
    print("B")
else:
    print("A")
    
0