結果

問題 No.207 世界のなんとか
ユーザー P48251659P48251659
提出日時 2015-06-14 03:46:12
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 3,023 ms
コンパイル使用メモリ 71,668 KB
実行使用メモリ 58,224 KB
最終ジャッジ日時 2023-09-21 01:20:37
合計ジャッジ時間 6,379 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,920 KB
testcase_01 WA -
testcase_02 AC 127 ms
53,476 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 125 ms
55,504 KB
testcase_06 AC 123 ms
55,828 KB
testcase_07 WA -
testcase_08 AC 123 ms
56,068 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 122 ms
56,256 KB
testcase_17 AC 121 ms
56,164 KB
testcase_18 AC 122 ms
55,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class test2 {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();

		for(;n <= m; n++) {
			if(n % 3 == 0) {
				System.out.println(n);
				continue;
			}

			// なんだかなぁ
			int tmp = n;
			while(tmp > 0) {
				tmp /= 10;
				if(tmp % 10 == 3) {
					System.out.println(n);
					break;
				}
			}
		}

	}

}
0