結果
| 問題 | No.582 キャンディー・ボックス3 |
| コンテスト | |
| ユーザー |
syunsuke
|
| 提出日時 | 2018-07-07 15:41:28 |
| 言語 | Python3 (3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 25 ms / 2,000 ms |
| + 437µs | |
| コード長 | 494 bytes |
| 記録 | |
| コンパイル時間 | 674 ms |
| コンパイル使用メモリ | 14,592 KB |
| 実行使用メモリ | 11,392 KB |
| 最終ジャッジ日時 | 2026-10-19 13:26:35 |
| 合計ジャッジ時間 | 2,577 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge6_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
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")
syunsuke