結果

問題 No.1046 Fruits Rush
ユーザー sasa8uyauya
提出日時 2024-08-31 11:05:37
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 126 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 82,324 KB
実行使用メモリ 54,000 KB
最終ジャッジ日時 2024-08-31 11:05:39
合計ジャッジ時間 1,761 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
c=0
for i in range(k):
	if a[~i]>0:
		c+=a[~i]
print(c)
0