結果
| 問題 | No.3453 Crape Shop |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-09 15:50:42 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 407 bytes |
| 記録 | |
| コンパイル時間 | 492 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 20,700 KB |
| 最終ジャッジ日時 | 2026-04-09 15:50:59 |
| 合計ジャッジ時間 | 15,911 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 22 |
ソースコード
N = int(input()) apple, banana = map(int, input().split()) orders = list(map(int, input().split)) for i in range(len(orders)): if orders[i] == 1: if apple == 0: print(i+1) exit() else: apple -= 1 elif orders[i] == 2: if banana == 0: print(i+1) exit() else: banana -= 1 else: if apple == 0 or banana == 0: print(i+1) exit() else: apple -= 1 banana -= 1 print(-1)