結果

問題 No.582 キャンディー・ボックス3
ユーザー syunsukesyunsuke
提出日時 2018-07-07 15:40:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 494 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 10,976 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-09-17 21:03:20
合計ジャッジ時間 1,317 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,844 KB
testcase_01 AC 16 ms
7,844 KB
testcase_02 AC 16 ms
7,804 KB
testcase_03 WA -
testcase_04 AC 16 ms
7,852 KB
testcase_05 AC 15 ms
7,732 KB
testcase_06 AC 15 ms
7,916 KB
testcase_07 AC 15 ms
7,856 KB
testcase_08 AC 15 ms
7,732 KB
testcase_09 WA -
testcase_10 AC 15 ms
7,824 KB
testcase_11 AC 15 ms
7,896 KB
testcase_12 AC 16 ms
7,816 KB
testcase_13 WA -
testcase_14 AC 16 ms
7,756 KB
testcase_15 WA -
testcase_16 AC 15 ms
7,776 KB
testcase_17 AC 15 ms
7,808 KB
testcase_18 AC 15 ms
7,880 KB
testcase_19 AC 15 ms
7,732 KB
権限があれば一括ダウンロードができます

ソースコード

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