結果

問題 No.1046 Fruits Rush
ユーザー tomoyaatcodertomoyaatcoder
提出日時 2020-07-25 18:52:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 152 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 71,564 KB
最終ジャッジ日時 2023-09-09 20:04:06
合計ジャッジ時間 2,853 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,472 KB
testcase_01 AC 70 ms
71,192 KB
testcase_02 AC 70 ms
71,160 KB
testcase_03 AC 71 ms
71,040 KB
testcase_04 AC 69 ms
71,376 KB
testcase_05 AC 71 ms
71,280 KB
testcase_06 AC 69 ms
71,140 KB
testcase_07 AC 70 ms
71,064 KB
testcase_08 AC 69 ms
71,208 KB
testcase_09 AC 71 ms
71,196 KB
testcase_10 AC 70 ms
71,064 KB
testcase_11 AC 71 ms
71,064 KB
testcase_12 AC 69 ms
71,352 KB
testcase_13 AC 70 ms
70,980 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
a = sorted(list(map(int, input().split())), reverse=True)
ans = 0
for i in range(k):
    ans += max(0, a[i])
print(ans)
0