結果
問題 | No.582 キャンディー・ボックス3 |
ユーザー |
|
提出日時 | 2022-10-18 19:10:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 420 bytes |
コンパイル時間 | 422 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-29 02:09:26 |
合計ジャッジ時間 | 1,374 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
def main(): _ = int(input()) C = list(map(int, input().split())) if sum(C) % 2 == 0: print("B") return B_choice = list(filter(lambda num: num >= 2, C)) if not B_choice: print("A") return if len(B_choice) >= 2: print("B") return if B_choice[0] > 2: print("B") else: print("A") if __name__ == "__main__": main()