結果

問題 No.804 野菜が苦手
ユーザー aya
提出日時 2019-08-02 13:32:29
言語 PHP
(843.2)
結果
WA  
実行時間 -
コード長 349 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 30,864 KB
実行使用メモリ 31,340 KB
最終ジャッジ日時 2024-07-05 08:05:09
合計ジャッジ時間 1,388 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
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=$vege;
}
echo $upperNmbTimes;
0