結果

問題 No.1046 Fruits Rush
ユーザー 67oYG9nh2YMmIci67oYG9nh2YMmIci
提出日時 2020-06-30 19:56:15
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 193 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-13 06:39:32
合計ジャッジ時間 1,313 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=[i for i in input().split()]
A=A.sorted()
A=A[::-1]
sum=0
for i in range(0,K):
    if int(A[i])>0:
        sum+=int(A[i])
    else:
        break
print(sum)
    
0