結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー SKSK
提出日時 2023-01-04 15:12:05
言語 PHP
(8.3.4)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 284 bytes
コンパイル時間 427 ms
コンパイル使用メモリ 18,652 KB
実行使用メモリ 27,064 KB
最終ジャッジ日時 2023-08-18 12:59:21
合計ジャッジ時間 1,828 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,560 KB
testcase_01 AC 17 ms
18,732 KB
testcase_02 AC 16 ms
18,732 KB
testcase_03 AC 16 ms
18,716 KB
testcase_04 AC 115 ms
26,964 KB
testcase_05 AC 16 ms
18,700 KB
testcase_06 AC 16 ms
18,704 KB
testcase_07 AC 97 ms
26,980 KB
testcase_08 AC 94 ms
27,004 KB
testcase_09 AC 93 ms
27,064 KB
testcase_10 AC 15 ms
18,844 KB
testcase_11 AC 15 ms
18,748 KB
testcase_12 AC 15 ms
18,864 KB
testcase_13 AC 15 ms
18,780 KB
testcase_14 AC 15 ms
18,840 KB
testcase_15 AC 15 ms
18,804 KB
testcase_16 AC 16 ms
18,728 KB
testcase_17 AC 15 ms
18,676 KB
testcase_18 AC 15 ms
18,704 KB
testcase_19 AC 16 ms
18,780 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
[$n,$m,$x,$y] = explode(" ",trim(fgets(STDIN)));
$a = explode(" ",trim(fgets(STDIN)));
sort($a);
$ans = 0;


for($i = $n-$m;$n > $i;$i++){
    if($a[$i] > $y){
        $ans += $a[$i];
    }
}


if($a[$n-$m-1] <= $x){
    echo $ans."\n";
}else{
    echo "Handicapped"."\n";
}

?>
0