結果

問題 No.207 世界のなんとか
ユーザー jonki324jonki324
提出日時 2018-06-03 15:24:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 423 bytes
コンパイル時間 2,166 ms
コンパイル使用メモリ 71,852 KB
実行使用メモリ 56,324 KB
最終ジャッジ日時 2023-09-12 21:53:19
合計ジャッジ時間 5,420 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,916 KB
testcase_01 AC 125 ms
55,920 KB
testcase_02 AC 130 ms
55,588 KB
testcase_03 AC 126 ms
56,296 KB
testcase_04 AC 126 ms
55,780 KB
testcase_05 AC 129 ms
56,244 KB
testcase_06 AC 123 ms
55,840 KB
testcase_07 AC 124 ms
55,524 KB
testcase_08 AC 124 ms
55,980 KB
testcase_09 AC 127 ms
55,592 KB
testcase_10 AC 129 ms
55,592 KB
testcase_11 AC 130 ms
55,832 KB
testcase_12 AC 131 ms
55,932 KB
testcase_13 AC 129 ms
55,716 KB
testcase_14 AC 131 ms
55,644 KB
testcase_15 AC 129 ms
55,860 KB
testcase_16 AC 125 ms
55,580 KB
testcase_17 AC 124 ms
56,324 KB
testcase_18 AC 125 ms
56,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        for (int i = a; i <= b; i++) {
            String s = String.valueOf(i);
            if (i % 3 == 0 || s.indexOf("3") != -1) {
                System.out.println(i);
            }
        }
        scan.close();
    }
}
0