結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー dangodango
提出日時 2023-06-25 14:48:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 229 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 83,064 KB
最終ジャッジ日時 2024-07-02 13:20:32
合計ジャッジ時間 2,082 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, x, y = map(int, input().split())
a = list(filter(lambda i: i > y, map(int, input().split())))
can = sum(1 for i in a if i < x)
if len(a) - can <= m:
    print(sum(sorted(a, reverse=True)[:m]))
else:
    print("Handicapped")
0