結果

問題 No.207 世界のなんとか
ユーザー koukonkokoukonko
提出日時 2015-12-16 17:31:23
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 713 bytes
コンパイル時間 2,012 ms
コンパイル使用メモリ 72,704 KB
実行使用メモリ 50,168 KB
最終ジャッジ日時 2023-10-14 10:50:22
合計ジャッジ時間 3,989 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 46 ms
49,448 KB
testcase_02 WA -
testcase_03 AC 46 ms
49,456 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 45 ms
49,564 KB
testcase_07 AC 45 ms
49,684 KB
testcase_08 AC 46 ms
49,584 KB
testcase_09 AC 46 ms
49,400 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 45 ms
49,540 KB
testcase_17 AC 44 ms
49,896 KB
testcase_18 AC 45 ms
49,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
		try {
			String[] box = read.readLine().split(" ");
			long[] num = new long[2];
			for (int i = 0; i < 2; ++i) {
				num[i] = Long.parseLong(box[i]);
			}

			while (num[0] <= num[1]) {

				String ch = num[0] + "";

				if (num[0] % 3 == 0) {
					System.out.println(num[0]);
				} else {
					for (int i = 0; i < ch.length(); ++i) {
						if (ch.charAt(i) == '3') {
							System.out.println(num[0]);
						}
					}
				}

				++num[0];
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
0