結果

問題 No.32 貯金箱の憂鬱
ユーザー 綾地寧々綾地寧々
提出日時 2015-05-12 08:35:34
言語 PHP
(8.3.4)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 270 bytes
コンパイル時間 733 ms
コンパイル使用メモリ 18,524 KB
実行使用メモリ 18,936 KB
最終ジャッジ日時 2023-09-30 07:50:09
合計ジャッジ時間 954 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,832 KB
testcase_01 AC 16 ms
18,936 KB
testcase_02 AC 16 ms
18,796 KB
testcase_03 AC 15 ms
18,844 KB
testcase_04 AC 16 ms
18,860 KB
testcase_05 AC 16 ms
18,724 KB
testcase_06 AC 16 ms
18,792 KB
testcase_07 AC 15 ms
18,736 KB
testcase_08 AC 15 ms
18,808 KB
testcase_09 AC 15 ms
18,720 KB
testcase_10 AC 16 ms
18,892 KB
testcase_11 AC 15 ms
18,812 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$money = trim(fgets(STDIN))*100;
$money += trim(fgets(STDIN))*25;
$money += trim(fgets(STDIN))*1;

$money = $money % 1000;
$coin = floor($money / 100);
$money = $money % 100;
$coin += floor($money / 25);
$money = $money % 25;
$coin += $money;

echo $coin.PHP_EOL;
0