結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー da_abda_ab
提出日時 2021-03-31 22:06:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 523 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 19,968 KB
最終ジャッジ日時 2024-05-09 07:57:21
合計ジャッジ時間 1,606 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 24 ms
10,752 KB
testcase_02 AC 24 ms
10,624 KB
testcase_03 AC 24 ms
10,752 KB
testcase_04 WA -
testcase_05 AC 26 ms
10,752 KB
testcase_06 AC 27 ms
10,624 KB
testcase_07 AC 51 ms
19,544 KB
testcase_08 AC 48 ms
19,548 KB
testcase_09 AC 51 ms
19,544 KB
testcase_10 WA -
testcase_11 AC 25 ms
10,752 KB
testcase_12 AC 24 ms
10,624 KB
testcase_13 WA -
testcase_14 AC 24 ms
10,752 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 25 ms
10,624 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# 1454 : ツブ消ししとるなEasy

from sys import stdin

numTbutter,finalNumTB,notDelBorder,delBorder=list(map(int,stdin.readline().split()))
tButter=list(map(int,stdin.readline().split()))

tButter.sort(reverse=True)
numLastTB=tButter[finalNumTB-1]
if numLastTB>=notDelBorder:
    print('Handicapped')
elif numLastTB>delBorder:
    print(sum(tButter[:finalNumTB]))
    print(tButter[:finalNumTB])
else:
    for i in range(finalNumTB):
        if tButter[i]<=delBorder:
            break
    print(sum(tButter[:i]))


0