結果

問題 No.207 世界のなんとか
ユーザー mazeppa1108mazeppa1108
提出日時 2015-05-31 14:14:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 337 bytes
コンパイル時間 3,063 ms
コンパイル使用メモリ 83,988 KB
実行使用メモリ 41,888 KB
最終ジャッジ日時 2024-04-17 16:13:07
合計ジャッジ時間 4,462 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
41,228 KB
testcase_01 AC 108 ms
41,556 KB
testcase_02 AC 115 ms
41,888 KB
testcase_03 AC 105 ms
41,548 KB
testcase_04 AC 99 ms
41,296 KB
testcase_05 AC 103 ms
40,524 KB
testcase_06 AC 107 ms
41,768 KB
testcase_07 AC 110 ms
41,420 KB
testcase_08 AC 112 ms
41,176 KB
testcase_09 AC 118 ms
41,256 KB
testcase_10 AC 122 ms
41,448 KB
testcase_11 AC 116 ms
41,532 KB
testcase_12 AC 116 ms
41,460 KB
testcase_13 AC 118 ms
41,316 KB
testcase_14 AC 114 ms
41,636 KB
testcase_15 AC 115 ms
41,568 KB
testcase_16 AC 107 ms
41,396 KB
testcase_17 AC 106 ms
41,280 KB
testcase_18 AC 96 ms
41,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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) {
				System.out.println(i);
			} else if(String.valueOf(i).matches(".*3.*")) {
				System.out.println(i);
			}
		}
	}
}
0