結果
| 問題 | No.582 キャンディー・ボックス3 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-09-18 14:34:43 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 115 ms / 2,000 ms |
| コード長 | 365 bytes |
| 記録 | |
| コンパイル時間 | 398 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 36,056 KB |
| 最終ジャッジ日時 | 2026-04-01 23:54:34 |
| 合計ジャッジ時間 | 3,333 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
N = int(input())
l = list(map(int, input().split()))
bwin_f = 0
two_f = 0
count = 0
for l_i in l:
if l_i != 0:
count += 1
if l_i > 2:
bwin_f += 1
if l_i == 2:
two_f += 1
if bwin_f == 0 and two_f == 1 and count % 2 == 0:
print("A")
elif bwin_f == 0 and two_f == 0 and count % 2 == 1:
print("A")
else:
print("B")