結果

問題 No.207 世界のなんとか
ユーザー ffmm00ffmm00
提出日時 2015-06-02 02:34:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 5,000 ms
コード長 368 bytes
コンパイル時間 3,980 ms
コンパイル使用メモリ 74,964 KB
実行使用メモリ 41,776 KB
最終ジャッジ日時 2024-04-17 16:15:22
合計ジャッジ時間 6,963 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
40,036 KB
testcase_01 AC 130 ms
41,108 KB
testcase_02 AC 141 ms
41,344 KB
testcase_03 AC 137 ms
41,452 KB
testcase_04 AC 133 ms
41,132 KB
testcase_05 AC 136 ms
41,528 KB
testcase_06 AC 132 ms
41,384 KB
testcase_07 AC 131 ms
41,540 KB
testcase_08 AC 132 ms
41,436 KB
testcase_09 AC 138 ms
41,036 KB
testcase_10 AC 138 ms
41,728 KB
testcase_11 AC 142 ms
41,456 KB
testcase_12 AC 140 ms
41,628 KB
testcase_13 AC 138 ms
41,260 KB
testcase_14 AC 137 ms
41,776 KB
testcase_15 AC 140 ms
41,512 KB
testcase_16 AC 134 ms
41,224 KB
testcase_17 AC 131 ms
41,160 KB
testcase_18 AC 119 ms
40,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class N207 {

	public static void main(String[] args) {

		Scanner sca = new Scanner(System.in);
		Long A = sca.nextLong();
		Long B = sca.nextLong();

		for (Long i = A; i <= B; i++) {
			String s = Long.toString(i);
			if (i % 3 == 0)
				System.out.println(i);
			else if (s.indexOf('3') >= 0)
				System.out.println(i);

		}

	}
}
0