結果

問題 No.207 世界のなんとか
ユーザー YOSHIYOSHI
提出日時 2021-03-05 21:51:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 341 bytes
コンパイル時間 3,484 ms
コンパイル使用メモリ 74,712 KB
実行使用メモリ 41,380 KB
最終ジャッジ日時 2024-04-16 09:17:53
合計ジャッジ時間 6,666 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
40,164 KB
testcase_01 AC 132 ms
41,068 KB
testcase_02 AC 138 ms
41,160 KB
testcase_03 AC 136 ms
41,124 KB
testcase_04 AC 121 ms
40,408 KB
testcase_05 AC 134 ms
40,952 KB
testcase_06 AC 132 ms
41,184 KB
testcase_07 AC 129 ms
41,176 KB
testcase_08 AC 129 ms
41,188 KB
testcase_09 AC 133 ms
40,796 KB
testcase_10 AC 133 ms
41,216 KB
testcase_11 AC 134 ms
41,380 KB
testcase_12 AC 137 ms
41,316 KB
testcase_13 AC 139 ms
40,996 KB
testcase_14 AC 136 ms
41,116 KB
testcase_15 AC 123 ms
40,192 KB
testcase_16 AC 129 ms
41,108 KB
testcase_17 AC 131 ms
41,028 KB
testcase_18 AC 117 ms
40,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No00000207_Main2 {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();

		for(int i = a; i <= b; i++) {
			if(i % 3 == 0 || String.valueOf(i).contains("3")) {
				System.out.println(i);
			}
		}
		scan. close();
	}
}
0