結果

問題 No.207 世界のなんとか
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-14 17:15:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 313 bytes
コンパイル時間 1,886 ms
コンパイル使用メモリ 71,336 KB
実行使用メモリ 56,468 KB
最終ジャッジ日時 2023-08-11 02:25:51
合計ジャッジ時間 5,106 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
55,728 KB
testcase_01 AC 114 ms
56,204 KB
testcase_02 AC 117 ms
55,952 KB
testcase_03 AC 113 ms
56,184 KB
testcase_04 AC 113 ms
55,660 KB
testcase_05 AC 112 ms
55,924 KB
testcase_06 AC 104 ms
55,884 KB
testcase_07 AC 107 ms
55,980 KB
testcase_08 AC 110 ms
56,084 KB
testcase_09 AC 111 ms
55,660 KB
testcase_10 AC 112 ms
56,244 KB
testcase_11 AC 115 ms
55,892 KB
testcase_12 AC 117 ms
55,892 KB
testcase_13 AC 116 ms
55,696 KB
testcase_14 AC 119 ms
56,196 KB
testcase_15 AC 118 ms
55,820 KB
testcase_16 AC 112 ms
56,468 KB
testcase_17 AC 112 ms
55,864 KB
testcase_18 AC 108 ms
56,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	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 || String.valueOf(i).indexOf("3") != -1) {
				System.out.println(i);
			}
		}
 	}
}
0