結果
| 問題 |
No.1007 コイン集め
|
| コンテスト | |
| ユーザー |
chinchilla
|
| 提出日時 | 2020-03-16 11:13:09 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 74 ms / 1,500 ms |
| コード長 | 169 bytes |
| コンパイル時間 | 192 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 21,656 KB |
| 最終ジャッジ日時 | 2024-11-28 00:30:29 |
| 合計ジャッジ時間 | 2,759 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 |
ソースコード
import sys n,k,*a=map(int,sys.stdin.read().split()) j=k-1 b=bytes(i>1 for i in a) print(a[j]-sum(sorted([-sum(a[b.rfind(0,0,j)-n:j]),-sum(a[b.find(0,k):j:-1])])[:a[j]]))
chinchilla