結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー | ant2357 |
提出日時 | 2016-03-23 23:25:08 |
言語 | PHP (843.2) |
結果 |
AC
|
実行時間 | 43 ms / 5,000 ms |
コード長 | 461 bytes |
コンパイル時間 | 1,293 ms |
コンパイル使用メモリ | 32,276 KB |
実行使用メモリ | 32,660 KB |
最終ジャッジ日時 | 2024-07-23 02:16:48 |
合計ジャッジ時間 | 1,214 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php //100円硬貨 $l = trim(fgets(STDIN) * 100); //25円硬貨 $m = trim(fgets(STDIN) * 25); //1円硬貨 $n = trim(fgets(STDIN)); //合計金額を算出 $totalPrice = $l + $m + $n; //100円硬貨の枚数を取得 $totalPrice %= 1000; $lCoin = floor($totalPrice / 100); //25円硬貨の枚数を取得 $totalPrice %= 100; $mCoin = floor($totalPrice / 25); //1円硬貨の枚数を取得 $totalPrice %= 25; //出力 echo($mCoin + $lCoin + $totalPrice);