結果

問題 No.1046 Fruits Rush
ユーザー otsunekootsuneko
提出日時 2021-05-14 10:15:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 198 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 82,460 KB
実行使用メモリ 53,948 KB
最終ジャッジ日時 2024-04-09 02:17:29
合計ジャッジ時間 1,639 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,132 KB
testcase_01 AC 33 ms
52,404 KB
testcase_02 AC 33 ms
52,792 KB
testcase_03 AC 34 ms
51,996 KB
testcase_04 AC 33 ms
52,836 KB
testcase_05 AC 33 ms
53,076 KB
testcase_06 AC 33 ms
52,944 KB
testcase_07 AC 32 ms
52,224 KB
testcase_08 AC 33 ms
52,896 KB
testcase_09 AC 33 ms
52,092 KB
testcase_10 AC 33 ms
52,604 KB
testcase_11 AC 33 ms
52,688 KB
testcase_12 AC 33 ms
52,688 KB
testcase_13 AC 33 ms
52,440 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse=True)

ans = 0
for i in range(K):
    if A[i] > 0:
        ans += A[i]
    else:
        break
print(ans)
0