結果

問題 No.207 世界のなんとか
ユーザー kuramubonnkuramubonn
提出日時 2023-02-01 20:13:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 436 bytes
コンパイル時間 2,186 ms
コンパイル使用メモリ 78,224 KB
実行使用メモリ 55,912 KB
最終ジャッジ日時 2023-09-14 06:15:47
合計ジャッジ時間 5,605 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,908 KB
testcase_01 AC 124 ms
55,684 KB
testcase_02 AC 124 ms
55,912 KB
testcase_03 AC 115 ms
39,636 KB
testcase_04 AC 112 ms
39,660 KB
testcase_05 AC 117 ms
39,820 KB
testcase_06 AC 111 ms
40,292 KB
testcase_07 AC 115 ms
40,056 KB
testcase_08 AC 110 ms
39,568 KB
testcase_09 AC 113 ms
40,020 KB
testcase_10 AC 116 ms
39,820 KB
testcase_11 AC 116 ms
39,804 KB
testcase_12 AC 116 ms
39,176 KB
testcase_13 AC 120 ms
39,320 KB
testcase_14 AC 118 ms
39,136 KB
testcase_15 AC 119 ms
39,256 KB
testcase_16 AC 110 ms
39,220 KB
testcase_17 AC 112 ms
39,112 KB
testcase_18 AC 112 ms
39,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt();
		for(int i = a ; i <= b ; i++) {
			if(i % 3 == 0) {
				System.out.println(i);
				continue;
			}
			String str = String.valueOf(i);
			char[] Array = str.toCharArray();
			for(char ch:Array) {
				if(ch == '3') {
					System.out.println(i);
					break;
				}
			}
		}
	}
}
0