結果
| 問題 |
No.1046 Fruits Rush
|
| コンテスト | |
| ユーザー |
Fuyuru
|
| 提出日時 | 2020-06-15 16:12:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 576 bytes |
| コンパイル時間 | 91 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,776 KB |
| 最終ジャッジ日時 | 2024-07-03 11:28:14 |
| 合計ジャッジ時間 | 1,385 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 14 |
ソースコード
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
N,K = I()
A = l()
A.sort(reverse=True)
ans = 0
for i in range(M):
if A[i] > 0:
ans += A[i]
else:
break
print(ans)
Fuyuru