結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー Takuya NoguchiTakuya Noguchi
提出日時 2021-06-29 00:17:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 96,316 KB
最終ジャッジ日時 2023-09-08 00:06:42
合計ジャッジ時間 3,680 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,260 KB
testcase_01 AC 66 ms
71,260 KB
testcase_02 AC 66 ms
71,292 KB
testcase_03 AC 68 ms
71,644 KB
testcase_04 AC 94 ms
96,316 KB
testcase_05 AC 67 ms
71,436 KB
testcase_06 AC 66 ms
71,452 KB
testcase_07 AC 144 ms
93,920 KB
testcase_08 AC 86 ms
88,032 KB
testcase_09 AC 86 ms
88,364 KB
testcase_10 AC 65 ms
71,652 KB
testcase_11 AC 67 ms
71,460 KB
testcase_12 WA -
testcase_13 AC 66 ms
71,332 KB
testcase_14 AC 66 ms
71,508 KB
testcase_15 AC 66 ms
71,456 KB
testcase_16 AC 67 ms
71,508 KB
testcase_17 AC 68 ms
71,132 KB
testcase_18 AC 67 ms
71,580 KB
testcase_19 AC 65 ms
71,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M, X, Y = map(int, input().rstrip().split())
a = list(map(int, input().rstrip().split()))
a = [n for n in a if n > Y]

if len(a) <= M:
  print(sum(a))
else:
  a.sort()

  while True:
    n = a.pop(0)
    if n >= X:
      break

    if len(a) <= M:
      break

  if len(a) <= M:
    print(sum(a))
  else:
    print('Handicapped')
0