結果

問題 No.1454 ツブ消ししとるなEasy
ユーザー SKSK
提出日時 2023-01-04 15:07:57
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 278 bytes
コンパイル時間 1,260 ms
コンパイル使用メモリ 18,556 KB
実行使用メモリ 27,040 KB
最終ジャッジ日時 2023-08-18 12:56:13
合計ジャッジ時間 3,181 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 13 ms
18,680 KB
testcase_02 AC 13 ms
18,676 KB
testcase_03 AC 13 ms
18,876 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 13 ms
18,760 KB
testcase_07 AC 76 ms
26,828 KB
testcase_08 AC 77 ms
27,020 KB
testcase_09 AC 77 ms
26,824 KB
testcase_10 WA -
testcase_11 AC 13 ms
18,932 KB
testcase_12 AC 14 ms
18,804 KB
testcase_13 AC 15 ms
18,676 KB
testcase_14 AC 14 ms
18,848 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 13 ms
18,660 KB
testcase_18 AC 13 ms
18,780 KB
testcase_19 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 = $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