結果

問題 No.32 貯金箱の憂鬱
ユーザー PcclaPccla
提出日時 2017-07-13 23:30:56
言語 PHP
(8.3.4)
結果
RE  
実行時間 -
コード長 389 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 30,788 KB
実行使用メモリ 31,532 KB
最終ジャッジ日時 2024-04-16 18:39:26
合計ジャッジ時間 1,107 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
fscanf(STDIN, "%d %d", $d, $p);

$n = trim(fgets(STDIN));
$m = trim(fgets(STDIN));
$l = trim(fgets(STDIN));

$ex_1   = floor(strval($n / 25));
$ex_25  = floor(strval($m / 4));
$ex_100 = floor(strval($l / 10));

$result_1   = $ex_1 + ($n - ($ex_1 * 25));
$result_25  = $ex_25 + ($m - ($ex_25 * 4));
$result_100 = $l - ($ex_100 * 10);

echo $result_1 + $result_25 + $result_100 . "\n";
0