結果
問題 | No.207 世界のなんとか |
ユーザー |
|
提出日時 | 2015-09-07 14:04:07 |
言語 | PHP (843.2) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 504 bytes |
コンパイル時間 | 298 ms |
コンパイル使用メモリ | 31,208 KB |
実行使用メモリ | 31,436 KB |
最終ジャッジ日時 | 2024-10-09 10:31:32 |
合計ジャッジ時間 | 1,839 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 RE * 1 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php $input = explode(" ", trim(fgets(STDIN))); $A = $input[0]; $B = $input[1]; $range = range($A, $B); for($i = 0; $i < count($range); $i++){ //3の倍数の配列 $mod = $range[$i] % 3; if($mod === 0){ $all[] = $range[$i]; } //3がつく数字の配列 $range_array = str_split((string)$range[$i]); foreach($range_array as $value){ if($value == 3){ $all[] = $range[$i]; } } } $all = array_unique($all); sort($all); foreach($all as $output){ echo $output, PHP_EOL; }