結果

問題 No.207 世界のなんとか
ユーザー Hiroaki KonoHiroaki Kono
提出日時 2017-10-26 20:54:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 417 bytes
コンパイル時間 3,201 ms
コンパイル使用メモリ 78,444 KB
実行使用メモリ 54,324 KB
最終ジャッジ日時 2024-05-01 15:16:08
合計ジャッジ時間 6,299 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
53,784 KB
testcase_01 AC 123 ms
53,920 KB
testcase_02 AC 118 ms
53,064 KB
testcase_03 AC 131 ms
54,324 KB
testcase_04 AC 122 ms
54,140 KB
testcase_05 AC 127 ms
54,024 KB
testcase_06 AC 110 ms
52,736 KB
testcase_07 AC 123 ms
53,964 KB
testcase_08 AC 127 ms
54,076 KB
testcase_09 AC 116 ms
53,184 KB
testcase_10 AC 130 ms
54,208 KB
testcase_11 AC 116 ms
52,916 KB
testcase_12 AC 116 ms
52,904 KB
testcase_13 AC 114 ms
52,820 KB
testcase_14 AC 132 ms
53,876 KB
testcase_15 AC 130 ms
53,932 KB
testcase_16 AC 107 ms
52,940 KB
testcase_17 AC 120 ms
53,780 KB
testcase_18 AC 124 ms
53,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.stream.IntStream;

public class No207 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int from = s.nextInt();
        int to = s.nextInt();
        IntStream.range(from, to + 1).forEach(n -> {
            if (n % 3 == 0 || (n + "").contains("3")) {
                System.out.println(n);
            }
        });
    }
}
0