結果

問題 No.207 世界のなんとか
ユーザー econo_coffeeecono_coffee
提出日時 2017-03-07 20:07:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 390 bytes
コンパイル時間 3,285 ms
コンパイル使用メモリ 72,416 KB
実行使用メモリ 56,664 KB
最終ジャッジ日時 2023-09-05 22:32:45
合計ジャッジ時間 7,072 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,980 KB
testcase_01 AC 123 ms
56,072 KB
testcase_02 AC 127 ms
56,096 KB
testcase_03 AC 124 ms
55,708 KB
testcase_04 AC 121 ms
56,428 KB
testcase_05 AC 127 ms
56,100 KB
testcase_06 AC 122 ms
55,700 KB
testcase_07 AC 122 ms
55,752 KB
testcase_08 AC 122 ms
56,236 KB
testcase_09 AC 125 ms
56,192 KB
testcase_10 AC 125 ms
56,664 KB
testcase_11 AC 126 ms
55,952 KB
testcase_12 AC 127 ms
53,860 KB
testcase_13 AC 124 ms
56,204 KB
testcase_14 AC 126 ms
56,308 KB
testcase_15 AC 124 ms
56,064 KB
testcase_16 AC 123 ms
55,812 KB
testcase_17 AC 121 ms
55,856 KB
testcase_18 AC 123 ms
56,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Yukicoder03 {

	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{
				String s = Integer.toString(i);

				if(s.indexOf("3") != -1){
					System.out.println(i);
				}
			}
		}

	}

}
0