結果
| 問題 | No.582 キャンディー・ボックス3 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-12-05 21:55:59 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 104 ms / 2,000 ms |
| コード長 | 339 bytes |
| 記録 | |
| コンパイル時間 | 590 ms |
| コンパイル使用メモリ | 20,956 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-03-28 23:08:55 |
| 合計ジャッジ時間 | 3,331 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
N = int(input())
C = list(map(int,input().split()))
count = 0
count1 = 0
count2 = 0
for i in C:
if i == 0:continue
if i== 1:count1 += 1
elif i == 2:count2 += 1
else:count += 1
if count:print('B')
elif count2 == 1 and count1 % 2 == 1:
print('A')
elif count2 == 0 and count1 % 2 == 1:
print('A')
else:
print('B')