結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
32,808 KB
testcase_01 AC 42 ms
32,808 KB
testcase_02 WA -
testcase_03 AC 42 ms
32,808 KB
testcase_04 AC 42 ms
32,808 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 42 ms
32,808 KB
testcase_08 AC 42 ms
32,808 KB
testcase_09 AC 42 ms
32,808 KB
testcase_10 AC 46 ms
32,808 KB
testcase_11 AC 42 ms
32,808 KB
testcase_12 AC 42 ms
32,808 KB
testcase_13 AC 44 ms
32,808 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 42 ms
32,808 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;
        }
    }
}
echo $ans;
0