結果

問題 No.804 野菜が苦手
ユーザー ayaaya
提出日時 2019-08-02 13:33:58
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 362 bytes
コンパイル時間 45 ms
コンパイル使用メモリ 18,456 KB
実行使用メモリ 18,840 KB
最終ジャッジ日時 2023-09-18 18:11:44
合計ジャッジ時間 1,195 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,724 KB
testcase_01 AC 16 ms
18,840 KB
testcase_02 AC 16 ms
18,724 KB
testcase_03 AC 15 ms
18,572 KB
testcase_04 AC 16 ms
18,832 KB
testcase_05 AC 15 ms
18,832 KB
testcase_06 WA -
testcase_07 AC 16 ms
18,748 KB
testcase_08 AC 15 ms
18,716 KB
testcase_09 AC 15 ms
18,672 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 16 ms
18,708 KB
testcase_15 AC 16 ms
18,716 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 15 ms
18,708 KB
testcase_19 AC 15 ms
18,700 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$input=explode(" ", (trim(fgets(STDIN))));
$vege=(int)$input[0];
$meat=(int)$input[1];
$meatPerVege=(int)$input[2];
$upperFoodLimit=(int)$input[3];
$upperNmbTimes=floor($upperFoodLimit/(1+$meatPerVege));

if($upperNmbTimes>$vege){
  $upperNmbTimes=$vege;
}
if($upperNmbTimes>$meat/$meatPerVege){
  $upperNmbTimes=$meat/$meatPerVege;
}
echo $upperNmbTimes;
0