結果

問題 No.207 世界のなんとか
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-14 17:15:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 313 bytes
コンパイル時間 2,109 ms
コンパイル使用メモリ 74,796 KB
実行使用メモリ 54,252 KB
最終ジャッジ日時 2024-04-28 19:34:38
合計ジャッジ時間 5,752 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 141 ms
53,764 KB
testcase_01 AC 140 ms
53,992 KB
testcase_02 AC 140 ms
54,252 KB
testcase_03 AC 137 ms
53,904 KB
testcase_04 AC 136 ms
53,912 KB
testcase_05 AC 143 ms
53,948 KB
testcase_06 AC 117 ms
52,732 KB
testcase_07 AC 130 ms
53,916 KB
testcase_08 AC 117 ms
52,632 KB
testcase_09 AC 141 ms
53,844 KB
testcase_10 AC 140 ms
54,172 KB
testcase_11 AC 137 ms
53,768 KB
testcase_12 AC 134 ms
53,852 KB
testcase_13 AC 136 ms
54,072 KB
testcase_14 AC 134 ms
53,676 KB
testcase_15 AC 138 ms
53,472 KB
testcase_16 AC 131 ms
53,980 KB
testcase_17 AC 132 ms
54,124 KB
testcase_18 AC 140 ms
54,156 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