結果

問題 No.207 世界のなんとか
ユーザー RyanakRyanak
提出日時 2017-09-07 16:17:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 144 ms / 5,000 ms
コード長 443 bytes
コンパイル時間 1,952 ms
コンパイル使用メモリ 74,564 KB
実行使用メモリ 41,540 KB
最終ジャッジ日時 2024-04-25 01:32:49
合計ジャッジ時間 5,797 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
39,908 KB
testcase_01 AC 116 ms
40,680 KB
testcase_02 AC 125 ms
41,016 KB
testcase_03 AC 117 ms
40,156 KB
testcase_04 AC 115 ms
40,004 KB
testcase_05 AC 126 ms
41,072 KB
testcase_06 AC 121 ms
40,900 KB
testcase_07 AC 118 ms
41,540 KB
testcase_08 AC 123 ms
41,216 KB
testcase_09 AC 115 ms
40,108 KB
testcase_10 AC 129 ms
41,444 KB
testcase_11 AC 137 ms
41,160 KB
testcase_12 AC 137 ms
41,112 KB
testcase_13 AC 122 ms
40,060 KB
testcase_14 AC 138 ms
40,816 KB
testcase_15 AC 141 ms
41,264 KB
testcase_16 AC 140 ms
41,412 KB
testcase_17 AC 144 ms
40,988 KB
testcase_18 AC 136 ms
41,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

        for (int i=a;i<=b;i++){
            String s=String.valueOf(i);
            if(i%3==0){
                System.out.println(i);
            }
            else if (s.indexOf("3")==-1);
            else System.out.println(i);
        }
    }
}
0