結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー KudeKude
提出日時 2021-03-31 21:17:35
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 86,836 KB
実行使用メモリ 90,200 KB
最終ジャッジ日時 2023-08-21 22:24:05
合計ジャッジ時間 3,116 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,548 KB
testcase_01 AC 75 ms
71,348 KB
testcase_02 AC 76 ms
71,292 KB
testcase_03 AC 77 ms
71,360 KB
testcase_04 AC 98 ms
90,200 KB
testcase_05 AC 76 ms
71,296 KB
testcase_06 AC 75 ms
71,148 KB
testcase_07 AC 98 ms
88,264 KB
testcase_08 AC 95 ms
83,272 KB
testcase_09 AC 94 ms
83,024 KB
testcase_10 AC 78 ms
71,012 KB
testcase_11 AC 77 ms
71,340 KB
testcase_12 AC 78 ms
71,420 KB
testcase_13 AC 77 ms
71,396 KB
testcase_14 AC 77 ms
71,184 KB
testcase_15 AC 77 ms
71,208 KB
testcase_16 AC 77 ms
71,356 KB
testcase_17 AC 76 ms
71,416 KB
testcase_18 AC 77 ms
71,340 KB
testcase_19 AC 75 ms
71,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, x, y = map(int, input().split())
a = []
b = []
for t in map(int, input().split()):
    if t >= x:
        a.append(t)
    elif t > y:
        b.append(t)
cnt = m - len(a)
if 0 <= cnt:
    ans = sum(a) + sum(sorted(b, reverse=True)[:cnt])
    print(ans)
else:
    print('Handicapped')
0