結果

問題 No.51 やる気の問題
ユーザー tazakkytazakky
提出日時 2017-09-01 12:09:03
言語 PHP
(8.3.4)
結果
AC  
実行時間 49 ms / 5,000 ms
コード長 262 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 30,824 KB
実行使用メモリ 31,276 KB
最終ジャッジ日時 2024-04-24 09:51:23
合計ジャッジ時間 2,018 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
31,056 KB
testcase_01 AC 41 ms
30,852 KB
testcase_02 AC 41 ms
30,952 KB
testcase_03 AC 41 ms
30,940 KB
testcase_04 AC 41 ms
31,080 KB
testcase_05 AC 47 ms
30,964 KB
testcase_06 AC 44 ms
30,948 KB
testcase_07 AC 45 ms
30,864 KB
testcase_08 AC 43 ms
30,824 KB
testcase_09 AC 49 ms
30,996 KB
testcase_10 AC 43 ms
30,836 KB
testcase_11 AC 44 ms
30,780 KB
testcase_12 AC 44 ms
31,276 KB
testcase_13 AC 45 ms
30,812 KB
testcase_14 AC 46 ms
31,076 KB
testcase_15 AC 45 ms
30,900 KB
testcase_16 AC 42 ms
30,756 KB
testcase_17 AC 43 ms
30,984 KB
testcase_18 AC 46 ms
31,216 KB
testcase_19 AC 46 ms
31,108 KB
testcase_20 AC 44 ms
30,968 KB
testcase_21 AC 41 ms
30,924 KB
testcase_22 AC 48 ms
30,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
    $w = trim(fgets(STDIN));
    $d = trim(fgets(STDIN));
    
    for($i = $d; $i > 1; $i--){
        //echo $d + 1 - $i."日目 ".floor($w / ($i ** 2))."\n";
        $w = $w - floor($w / (pow($i, 2)));
        //echo $w."\n";
    }
    
    echo $w;

?>
0