結果
| 問題 |
No.1046 Fruits Rush
|
| コンテスト | |
| ユーザー |
_APPAH_
|
| 提出日時 | 2020-05-09 01:44:32 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 338 bytes |
| コンパイル時間 | 329 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-04 03:32:21 |
| 合計ジャッジ時間 | 1,522 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 3 |
ソースコード
import sys
sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7
def resolve():
n, k = map(int, input().split())
A = sorted(list(map(int, input().split())), reverse=True)
res = 0
for i in range(k):
if A[i] > 0:
res += A[i]
print(res)
if __name__ == '__main__':
resolve()
_APPAH_