結果

問題 No.63 ポッキーゲーム
ユーザー tazakkytazakky
提出日時 2017-08-30 11:47:00
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 308 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 30,724 KB
実行使用メモリ 31,076 KB
最終ジャッジ日時 2024-04-24 07:16:00
合計ジャッジ時間 1,740 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
31,076 KB
testcase_01 AC 43 ms
30,632 KB
testcase_02 AC 42 ms
30,836 KB
testcase_03 AC 40 ms
30,524 KB
testcase_04 WA -
testcase_05 AC 36 ms
30,860 KB
testcase_06 AC 37 ms
30,564 KB
testcase_07 AC 36 ms
31,008 KB
testcase_08 AC 37 ms
30,712 KB
testcase_09 AC 36 ms
30,716 KB
testcase_10 AC 37 ms
30,644 KB
testcase_11 AC 37 ms
30,924 KB
testcase_12 AC 38 ms
30,880 KB
testcase_13 WA -
testcase_14 AC 37 ms
30,664 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 37 ms
30,676 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
    list($l, $k) = explode(" ", trim(fgets(STDIN)));
    
    $bite = floor($l / ($k * 2));
    if($bite < 1){
        $bite = 0;
    }
    $nokori = $l - ($k * 2) * $bite;
    $count = $bite;
    while($nokori > ($k * 2)){
    $nokori = $nokori - ($k * 2);
    $count++;
    }
    echo $count * $k;
?>
0