結果
| 問題 |
No.1007 コイン集め
|
| コンテスト | |
| ユーザー |
chinchilla
|
| 提出日時 | 2020-03-15 10:43:42 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 69 ms / 1,500 ms |
| コード長 | 210 bytes |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 21,528 KB |
| 最終ジャッジ日時 | 2024-11-24 16:12:06 |
| 合計ジャッジ時間 | 2,282 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 |
ソースコード
n, k = map(int, input().split()) a = list(map(int, input().split())) b = bytes(i > 1 for i in a) print(sum((sorted([ sum(a[b.rfind(0, 0, k-1)-n:k-1]), sum(a[b.find(0, k):k-1:-1]) ])+[a[k-1]])[-1-a[k-1]:]))
chinchilla