結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-03-31 21:07:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 362 bytes
コンパイル時間 1,164 ms
コンパイル使用メモリ 86,584 KB
実行使用メモリ 90,008 KB
最終ジャッジ日時 2023-08-21 19:13:32
合計ジャッジ時間 3,644 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,332 KB
testcase_01 AC 70 ms
71,200 KB
testcase_02 AC 70 ms
71,108 KB
testcase_03 AC 71 ms
71,228 KB
testcase_04 AC 93 ms
90,008 KB
testcase_05 AC 70 ms
71,304 KB
testcase_06 AC 69 ms
71,088 KB
testcase_07 AC 90 ms
87,920 KB
testcase_08 AC 92 ms
88,444 KB
testcase_09 AC 95 ms
88,156 KB
testcase_10 AC 71 ms
71,380 KB
testcase_11 AC 72 ms
71,072 KB
testcase_12 AC 70 ms
71,092 KB
testcase_13 AC 71 ms
71,132 KB
testcase_14 AC 70 ms
71,180 KB
testcase_15 AC 72 ms
71,176 KB
testcase_16 AC 71 ms
71,072 KB
testcase_17 AC 70 ms
71,272 KB
testcase_18 AC 71 ms
71,064 KB
testcase_19 AC 70 ms
71,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

"""

import sys
from sys import stdin

N,M,X,Y = map(int,input().split())

A = list(map(int,input().split()))

A.sort()
A.reverse()

ans = 0
for i in range(N):

    if i < M:

        if A[i] <= Y:
            pass
        else:
            ans += A[i]

    else:
        if A[i] >= X:
            print ("Handicapped")
            sys.exit()

print (ans)
0