結果

問題 No.32 貯金箱の憂鬱
ユーザー
提出日時 2016-01-20 15:25:57
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 528 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 32,748 KB
実行使用メモリ 32,872 KB
最終ジャッジ日時 2023-10-21 13:32:04
合計ジャッジ時間 1,274 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
32,852 KB
testcase_01 AC 42 ms
32,852 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 43 ms
32,852 KB
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;
}

$count1 = $input[0];
$count25 = $input[1];
$count100 = $input[2];
$countAll = 0;

$en1 = floor($count1 / 25);

if($en1 < 1){
    $countAll += $count1;
}else{
    $count25 += $en1;
}

$en25 = floor($count25 / 4);

if($en25 < 1){
    $countAll += $count25;
}else{
    $count100 += $en25;
}

$en100 = floor($count100 /10);

$en100Amari = $count100 - ($en100 * 10);

if($en100Amari >= 1){
    $countAll += $en100Amari;
}

echo $countAll."\n";
0