結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー Takuya NoguchiTakuya Noguchi
提出日時 2021-06-29 00:20:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 96,304 KB
最終ジャッジ日時 2023-09-08 00:06:45
合計ジャッジ時間 2,946 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,616 KB
testcase_01 AC 67 ms
71,132 KB
testcase_02 AC 69 ms
71,332 KB
testcase_03 AC 68 ms
71,564 KB
testcase_04 AC 95 ms
96,304 KB
testcase_05 AC 68 ms
71,460 KB
testcase_06 AC 69 ms
71,408 KB
testcase_07 AC 146 ms
93,844 KB
testcase_08 AC 89 ms
88,100 KB
testcase_09 AC 88 ms
88,368 KB
testcase_10 AC 67 ms
71,292 KB
testcase_11 AC 71 ms
71,400 KB
testcase_12 AC 70 ms
71,332 KB
testcase_13 AC 69 ms
71,508 KB
testcase_14 AC 68 ms
71,480 KB
testcase_15 AC 71 ms
71,300 KB
testcase_16 AC 70 ms
71,572 KB
testcase_17 AC 67 ms
71,428 KB
testcase_18 AC 69 ms
71,596 KB
testcase_19 AC 70 ms
71,304 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:
      print('Handicapped')
      exit()

    if len(a) <= M:
      print(sum(a))
      exit()
0