結果

問題 No.542 1円玉と5円玉
ユーザー PicklesSuperiorPicklesSuperior
提出日時 2018-10-21 01:47:41
言語 PHP
(8.3.4)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 405 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 31,000 KB
実行使用メモリ 31,432 KB
最終ジャッジ日時 2024-04-29 20:06:31
合計ジャッジ時間 1,412 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
31,168 KB
testcase_01 AC 42 ms
31,240 KB
testcase_02 AC 40 ms
31,400 KB
testcase_03 AC 40 ms
31,252 KB
testcase_04 AC 40 ms
31,396 KB
testcase_05 AC 40 ms
31,100 KB
testcase_06 AC 40 ms
31,056 KB
testcase_07 AC 40 ms
31,276 KB
testcase_08 AC 41 ms
31,224 KB
testcase_09 AC 41 ms
31,104 KB
testcase_10 AC 41 ms
31,132 KB
testcase_11 AC 40 ms
31,208 KB
testcase_12 AC 42 ms
31,432 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
    $input = preg_split('/ /',fgets(STDIN));
    $one = $input[0];
    $five = $input[1];
    $ans;

    for($i=0;$i<$five;$i++){
        for($j=0;$j<=$one;$j++){
            $ans = $i*5+$j;
            if($ans != 0) print($ans . "\n");
            if($j==4) break;
        }
    }
    for($i=0;$i<=$one;$i++){
        $ans = $five*5+$i;
        if($ans != 0) print($five*5+$i . "\n");
    }
    
?>
0