結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー Super SolenoidSuper Solenoid
提出日時 2021-05-02 05:52:30
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 346 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,820 KB
実行使用メモリ 19,644 KB
最終ジャッジ日時 2023-09-27 19:55:54
合計ジャッジ時間 1,569 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 15 ms
7,904 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 15 ms
7,740 KB
testcase_07 AC 42 ms
18,976 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 14 ms
7,752 KB
testcase_13 WA -
testcase_14 AC 14 ms
7,852 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

x = [i for i in A if i >= X]
L = len(x)
S = sum(x)
if L >= M:
    print('Handicapped')
else:
    print(A)
    z = [j for j in A if j < X and j > Y]
    print(z)
    l = len(z)
    if l + L <= M:
        print(sum(z)+S)
    else:
        print(sum(sorted(z)[(l+L-M):])+S)
0