結果

問題 No.804 野菜が苦手
ユーザー mondomondo
提出日時 2019-08-13 14:11:37
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 32,684 KB
実行使用メモリ 32,808 KB
最終ジャッジ日時 2023-10-19 17:05:40
合計ジャッジ時間 1,710 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

<?php
list($vege, $meat, $double, $count) = explode(" ",trim(fgets(STDIN)));
for($i = 1; $i <= $vege; $i++){
    if($meat - ($i * $double) >= 0){
        if($count - ($i + ($i * $double)) >= 0){
            $ans = $i;
        } else {
            $ans = 0;
        }
    } else {
        $ans = 0;
    }
}
echo $ans;
0