結果

問題 No.207 世界のなんとか
ユーザー Hiroaki KonoHiroaki Kono
提出日時 2017-10-26 20:54:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 417 bytes
コンパイル時間 3,582 ms
コンパイル使用メモリ 75,804 KB
実行使用メモリ 56,660 KB
最終ジャッジ日時 2023-08-14 02:11:31
合計ジャッジ時間 6,209 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
56,136 KB
testcase_01 AC 103 ms
55,648 KB
testcase_02 AC 109 ms
56,660 KB
testcase_03 AC 105 ms
55,856 KB
testcase_04 AC 104 ms
56,204 KB
testcase_05 AC 106 ms
56,064 KB
testcase_06 AC 103 ms
55,976 KB
testcase_07 AC 103 ms
55,860 KB
testcase_08 AC 103 ms
56,192 KB
testcase_09 AC 107 ms
55,840 KB
testcase_10 AC 109 ms
56,080 KB
testcase_11 AC 108 ms
56,344 KB
testcase_12 AC 110 ms
56,072 KB
testcase_13 AC 114 ms
55,928 KB
testcase_14 AC 119 ms
56,232 KB
testcase_15 AC 111 ms
56,104 KB
testcase_16 AC 104 ms
56,104 KB
testcase_17 AC 104 ms
55,840 KB
testcase_18 AC 105 ms
55,760 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