結果

問題 No.207 世界のなんとか
ユーザー Shunsuke KamadaShunsuke Kamada
提出日時 2018-09-25 23:43:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 482 bytes
コンパイル時間 4,073 ms
コンパイル使用メモリ 74,260 KB
実行使用メモリ 54,348 KB
最終ジャッジ日時 2024-04-16 09:52:55
合計ジャッジ時間 7,315 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
54,100 KB
testcase_01 AC 123 ms
53,840 KB
testcase_02 AC 129 ms
54,080 KB
testcase_03 AC 122 ms
54,068 KB
testcase_04 AC 127 ms
54,020 KB
testcase_05 AC 133 ms
54,016 KB
testcase_06 AC 127 ms
54,224 KB
testcase_07 AC 130 ms
54,244 KB
testcase_08 AC 129 ms
54,052 KB
testcase_09 AC 129 ms
54,172 KB
testcase_10 AC 117 ms
52,732 KB
testcase_11 AC 127 ms
54,112 KB
testcase_12 AC 117 ms
53,120 KB
testcase_13 AC 131 ms
54,116 KB
testcase_14 AC 132 ms
54,348 KB
testcase_15 AC 126 ms
54,064 KB
testcase_16 AC 129 ms
53,980 KB
testcase_17 AC 128 ms
54,164 KB
testcase_18 AC 115 ms
53,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter;
import java.util.*;

public class No0207 {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int a = scanner.nextInt();
        int b = scanner.nextInt();

        for(int i = a; i <= b; i++) {
            if (Integer.toString(i).contains("3") || i%3 == 0) {
                out.println(i);
            }
        }
        out.flush();
    }
}
0