結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー |
|
提出日時 | 2018-04-24 20:40:36 |
言語 | PHP (843.2) |
結果 |
AC
|
実行時間 | 44 ms / 5,000 ms |
コード長 | 345 bytes |
コンパイル時間 | 1,141 ms |
コンパイル使用メモリ | 32,272 KB |
実行使用メモリ | 32,532 KB |
最終ジャッジ日時 | 2024-07-23 07:09:51 |
合計ジャッジ時間 | 2,411 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?phpfscanf(STDIN, '%d', $L); // 100円L枚fscanf(STDIN, '%d', $M); // 25円M枚fscanf(STDIN, '%d', $N); // 1円N枚$O = 0; // 1000円0枚function exchange(&$smaller, &$bigger, $bdr){while($smaller >= $bdr){$smaller -= $bdr;$bigger++;}}exchange($N, $M, 25);exchange($M, $L, 4);exchange($L, $O, 10);echo $L + $M + $N;