結果

問題 No.207 世界のなんとか
ユーザー GrenacheGrenache
提出日時 2015-05-15 22:24:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 454 bytes
コンパイル時間 4,010 ms
コンパイル使用メモリ 77,948 KB
実行使用メモリ 41,816 KB
最終ジャッジ日時 2024-04-17 15:21:37
合計ジャッジ時間 7,412 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
41,636 KB
testcase_01 AC 133 ms
41,472 KB
testcase_02 AC 134 ms
41,292 KB
testcase_03 AC 135 ms
41,488 KB
testcase_04 AC 132 ms
41,212 KB
testcase_05 AC 137 ms
41,388 KB
testcase_06 AC 131 ms
41,284 KB
testcase_07 AC 118 ms
40,232 KB
testcase_08 AC 133 ms
41,384 KB
testcase_09 AC 137 ms
41,768 KB
testcase_10 AC 143 ms
41,632 KB
testcase_11 AC 138 ms
41,796 KB
testcase_12 AC 139 ms
41,336 KB
testcase_13 AC 139 ms
41,640 KB
testcase_14 AC 139 ms
41,608 KB
testcase_15 AC 139 ms
41,260 KB
testcase_16 AC 134 ms
41,816 KB
testcase_17 AC 132 ms
41,392 KB
testcase_18 AC 134 ms
41,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main_yukicoder207 {
	
	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++) {
			if (i % 3 == 0) {
				System.out.println(i);
			} else {
				int tmp = i;
				while (tmp != 0) {
					if (tmp % 10 == 3) {
						System.out.println(i);
						break;
					}
					tmp /= 10;
				}
			}
		}
		
		sc.close();
	}
}
0