結果
| 問題 | No.32 貯金箱の憂鬱 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-01-20 12:24:08 |
| 言語 | PHP (8.5.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 490 bytes |
| 記録 | |
| コンパイル時間 | 1,152 ms |
| コンパイル使用メモリ | 36,396 KB |
| 実行使用メモリ | 38,392 KB |
| 最終ジャッジ日時 | 2026-04-09 19:54:27 |
| 合計ジャッジ時間 | 2,459 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 10 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
for($i = 0; $i < 3; $i ++){
$in = trim(fgets(STDIN));
$input[$i] = $in;
}
$count = 0;
$en1 = floor($input[0] / 25);
$en25 = floor($input[1] / 4);
$en100 = floor($input[2] /10);
$en100Amari = $input[2] - $en100 * 10;
if($en1 > 0){
$count += $en1;
}else{
$count += $input[0];
}
if($en25 > 0){
$count += $en25;
}else{
$count += $input[1];
}
if($en100Amari > 0){
$count += $enAmari;
}
if($input[2] <= 9){
$count += $input[2];
}
echo $count."\n";