結果

問題 No.207 世界のなんとか
ユーザー jimanojimano
提出日時 2015-10-12 10:04:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 112 ms / 5,000 ms
コード長 372 bytes
コンパイル時間 2,576 ms
コンパイル使用メモリ 75,060 KB
実行使用メモリ 54,312 KB
最終ジャッジ日時 2024-04-17 16:29:05
合計ジャッジ時間 5,178 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
52,736 KB
testcase_01 AC 102 ms
54,088 KB
testcase_02 AC 100 ms
53,000 KB
testcase_03 AC 106 ms
54,176 KB
testcase_04 AC 103 ms
53,784 KB
testcase_05 AC 106 ms
54,028 KB
testcase_06 AC 104 ms
54,136 KB
testcase_07 AC 107 ms
54,132 KB
testcase_08 AC 104 ms
54,260 KB
testcase_09 AC 107 ms
53,988 KB
testcase_10 AC 106 ms
54,300 KB
testcase_11 AC 95 ms
52,696 KB
testcase_12 AC 105 ms
53,748 KB
testcase_13 AC 112 ms
54,244 KB
testcase_14 AC 100 ms
52,752 KB
testcase_15 AC 98 ms
52,832 KB
testcase_16 AC 104 ms
54,076 KB
testcase_17 AC 101 ms
53,860 KB
testcase_18 AC 103 ms
54,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No207 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		final long a = sc.nextLong();
		final long b = sc.nextLong();
		
		for(long i = a; i <= b; i++){
			if(isNabe(i)) System.out.println(i);
		}
	}
	
	static boolean isNabe(long i){
		return i % 3 == 0 || Long.toString(i).indexOf("3") >= 0;
	}
}
0