結果

問題 No.804 野菜が苦手
ユーザー dyechidyechi
提出日時 2019-03-28 09:38:35
言語 PHP
(8.3.4)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 4,386 ms
コンパイル使用メモリ 31,188 KB
実行使用メモリ 31,508 KB
最終ジャッジ日時 2024-04-20 14:47:21
合計ジャッジ時間 2,203 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
31,284 KB
testcase_01 AC 40 ms
31,384 KB
testcase_02 AC 40 ms
31,404 KB
testcase_03 AC 40 ms
30,980 KB
testcase_04 AC 39 ms
31,372 KB
testcase_05 AC 40 ms
31,260 KB
testcase_06 AC 40 ms
31,428 KB
testcase_07 AC 41 ms
31,300 KB
testcase_08 AC 40 ms
31,484 KB
testcase_09 AC 41 ms
31,340 KB
testcase_10 AC 42 ms
31,116 KB
testcase_11 AC 40 ms
31,088 KB
testcase_12 AC 40 ms
31,064 KB
testcase_13 AC 41 ms
31,224 KB
testcase_14 AC 43 ms
31,508 KB
testcase_15 AC 42 ms
31,132 KB
testcase_16 AC 40 ms
31,232 KB
testcase_17 AC 43 ms
31,264 KB
testcase_18 AC 41 ms
31,188 KB
testcase_19 AC 41 ms
31,364 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$s = trim(fgets(STDIN));
$s = explode(" ", $s);

for ($i=1; $i<=$s[0]; $i++) {
	if ($i*$s[2] <= $s[1] && $i + $i*$s[2] <= $s[3]){
	    $arr[] = $i;
	}
}
if (isset($arr)) {
    rsort($arr);
    echo $arr[0].PHP_EOL;
} else {
    echo "0".PHP_EOL;
}
?>
0