結果
問題 |
No.1454 ツブ消ししとるなEasy
|
ユーザー |
|
提出日時 | 2021-05-02 05:54:19 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 320 bytes |
コンパイル時間 | 96 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 20,752 KB |
最終ジャッジ日時 | 2024-07-20 14:28:11 |
合計ジャッジ時間 | 1,455 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 WA * 3 |
ソースコード
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: z = [j for j in A if j < X and j > Y] l = len(z) if l + L <= M: print(sum(z)+S) else: print(sum(sorted(z)[(l+L-M):])+S)