結果

問題 No.207 世界のなんとか
ユーザー
提出日時 2016-01-20 18:02:49
言語 PHP
(8.3.4)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 362 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 30,908 KB
実行使用メモリ 31,592 KB
最終ジャッジ日時 2024-04-17 16:38:07
合計ジャッジ時間 1,286 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
31,388 KB
testcase_01 AC 34 ms
31,112 KB
testcase_02 AC 33 ms
31,084 KB
testcase_03 AC 35 ms
31,592 KB
testcase_04 AC 32 ms
31,484 KB
testcase_05 AC 31 ms
31,268 KB
testcase_06 AC 30 ms
31,200 KB
testcase_07 AC 31 ms
31,204 KB
testcase_08 AC 31 ms
31,496 KB
testcase_09 AC 30 ms
31,136 KB
testcase_10 AC 31 ms
31,228 KB
testcase_11 AC 30 ms
31,200 KB
testcase_12 AC 32 ms
31,180 KB
testcase_13 AC 31 ms
31,292 KB
testcase_14 AC 31 ms
30,984 KB
testcase_15 AC 30 ms
31,500 KB
testcase_16 AC 31 ms
31,168 KB
testcase_17 AC 31 ms
30,984 KB
testcase_18 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

$input = trim(fgets(STDIN));

$count = explode(" ", $input);

for($i = $count[0]; $i <= $count[1]; $i ++){
    $num[] = $i;
}

foreach($num as $key => $value){
    $match = preg_match("/3/",$value);
    if($value % 3 == 0 or $match == true){
        $answer[] = $value;
    }
}

asort($answer);

foreach($answer as $key => $value){
    echo $value."\n";
}
0