結果

問題 No.32 貯金箱の憂鬱
ユーザー
提出日時 2016-01-20 12:24:08
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 490 bytes
コンパイル時間 6,586 ms
コンパイル使用メモリ 32,084 KB
実行使用メモリ 32,644 KB
最終ジャッジ日時 2023-10-21 13:29:38
合計ジャッジ時間 7,004 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

<?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";
0