結果

問題 No.1046 Fruits Rush
ユーザー pypypymipypypymi
提出日時 2022-02-12 09:46:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 182 bytes
コンパイル時間 1,324 ms
コンパイル使用メモリ 86,764 KB
実行使用メモリ 71,540 KB
最終ジャッジ日時 2023-09-10 20:18:09
合計ジャッジ時間 2,805 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 71 ms
71,332 KB
testcase_02 AC 70 ms
71,084 KB
testcase_03 AC 71 ms
71,216 KB
testcase_04 WA -
testcase_05 AC 73 ms
71,084 KB
testcase_06 AC 71 ms
71,428 KB
testcase_07 AC 71 ms
71,272 KB
testcase_08 AC 71 ms
71,408 KB
testcase_09 WA -
testcase_10 AC 72 ms
71,396 KB
testcase_11 AC 72 ms
71,212 KB
testcase_12 AC 72 ms
71,124 KB
testcase_13 AC 71 ms
71,388 KB
testcase_14 AC 70 ms
71,116 KB
testcase_15 AC 70 ms
71,244 KB
testcase_16 AC 71 ms
71,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
an = sorted(list(map(int,input().split())))[::-1]
count = an[0]
for i in range(1,len(an)):
    if an[i]<0:break
    else:count+=an[i]
print(count)
    
0