結果

問題 No.207 世界のなんとか
ユーザー jimanojimano
提出日時 2015-10-12 10:02:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 368 bytes
コンパイル時間 3,350 ms
コンパイル使用メモリ 74,584 KB
実行使用メモリ 41,784 KB
最終ジャッジ日時 2024-04-17 16:28:56
合計ジャッジ時間 5,334 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
41,388 KB
testcase_01 AC 109 ms
41,160 KB
testcase_02 AC 113 ms
41,688 KB
testcase_03 AC 105 ms
40,108 KB
testcase_04 AC 103 ms
41,364 KB
testcase_05 AC 108 ms
41,540 KB
testcase_06 AC 103 ms
41,784 KB
testcase_07 AC 94 ms
41,360 KB
testcase_08 AC 107 ms
41,372 KB
testcase_09 AC 109 ms
41,364 KB
testcase_10 AC 98 ms
41,424 KB
testcase_11 AC 108 ms
41,368 KB
testcase_12 AC 108 ms
41,556 KB
testcase_13 AC 124 ms
41,396 KB
testcase_14 AC 111 ms
41,660 KB
testcase_15 AC 108 ms
41,420 KB
testcase_16 AC 95 ms
41,520 KB
testcase_17 AC 104 ms
41,636 KB
testcase_18 AC 95 ms
41,468 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).contains("3");
	}
}
0