結果

問題 No.207 世界のなんとか
ユーザー Flere0114Flere0114
提出日時 2016-02-10 15:11:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 144 ms / 5,000 ms
コード長 486 bytes
コンパイル時間 3,438 ms
コンパイル使用メモリ 74,652 KB
実行使用メモリ 41,644 KB
最終ジャッジ日時 2024-04-17 16:39:03
合計ジャッジ時間 6,911 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
41,252 KB
testcase_01 AC 135 ms
41,064 KB
testcase_02 AC 143 ms
41,320 KB
testcase_03 AC 135 ms
41,216 KB
testcase_04 AC 134 ms
41,196 KB
testcase_05 AC 138 ms
40,972 KB
testcase_06 AC 136 ms
41,160 KB
testcase_07 AC 137 ms
41,272 KB
testcase_08 AC 138 ms
41,012 KB
testcase_09 AC 142 ms
41,148 KB
testcase_10 AC 143 ms
41,396 KB
testcase_11 AC 140 ms
40,980 KB
testcase_12 AC 144 ms
41,532 KB
testcase_13 AC 143 ms
41,212 KB
testcase_14 AC 141 ms
41,240 KB
testcase_15 AC 139 ms
41,268 KB
testcase_16 AC 136 ms
41,344 KB
testcase_17 AC 137 ms
41,644 KB
testcase_18 AC 133 ms
41,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No207 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        String check;

        while(a <= b){
            check = String.valueOf(a);
            if(check.indexOf("3") != -1){
                System.out.println(a);
            }else if(a % 3 == 0){
                System.out.println(a);
            }
            a++;
        }
    }
}
0