結果

問題 No.207 世界のなんとか
ユーザー kameyama_skameyama_s
提出日時 2023-04-17 18:19:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 349 bytes
コンパイル時間 3,921 ms
コンパイル使用メモリ 73,652 KB
実行使用メモリ 41,348 KB
最終ジャッジ日時 2024-04-20 21:35:38
合計ジャッジ時間 5,978 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
40,260 KB
testcase_01 AC 119 ms
40,984 KB
testcase_02 AC 109 ms
40,180 KB
testcase_03 AC 107 ms
39,996 KB
testcase_04 AC 111 ms
40,144 KB
testcase_05 AC 116 ms
41,096 KB
testcase_06 AC 104 ms
40,060 KB
testcase_07 AC 106 ms
40,116 KB
testcase_08 AC 102 ms
40,136 KB
testcase_09 AC 115 ms
40,956 KB
testcase_10 AC 115 ms
40,888 KB
testcase_11 AC 119 ms
41,256 KB
testcase_12 AC 121 ms
41,348 KB
testcase_13 AC 124 ms
40,028 KB
testcase_14 AC 117 ms
41,160 KB
testcase_15 AC 110 ms
40,580 KB
testcase_16 AC 116 ms
40,960 KB
testcase_17 AC 102 ms
39,936 KB
testcase_18 AC 107 ms
40,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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