結果
問題 | No.582 キャンディー・ボックス3 |
ユーザー |
![]() |
提出日時 | 2025-01-08 17:29:35 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 76 ms / 2,000 ms |
コード長 | 375 bytes |
コンパイル時間 | 1,075 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 52,096 KB |
最終ジャッジ日時 | 2025-01-08 17:29:39 |
合計ジャッジ時間 | 2,237 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
N = int(input())A2 = list(map(int,input().split()))A = []for a in A2:if a > 0:A.append(a)N = len(A)if N == 0:print("B")elif max(A) > 2:print("B")elif N - A.count(1) > 1:print("B")elif max(A) == 2:if N % 2 == 0:print("A")else:print("B")else:if N % 2 == 0:print("B")else:print("A")