結果

問題 No.207 世界のなんとか
ユーザー P48251659P48251659
提出日時 2015-06-14 03:48:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 140 ms / 5,000 ms
コード長 432 bytes
コンパイル時間 3,685 ms
コンパイル使用メモリ 74,912 KB
実行使用メモリ 41,792 KB
最終ジャッジ日時 2024-04-17 16:16:31
合計ジャッジ時間 6,710 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
41,212 KB
testcase_01 AC 119 ms
40,064 KB
testcase_02 AC 137 ms
41,416 KB
testcase_03 AC 133 ms
41,132 KB
testcase_04 AC 117 ms
40,012 KB
testcase_05 AC 137 ms
41,260 KB
testcase_06 AC 119 ms
39,968 KB
testcase_07 AC 130 ms
41,412 KB
testcase_08 AC 130 ms
41,792 KB
testcase_09 AC 138 ms
41,152 KB
testcase_10 AC 127 ms
40,288 KB
testcase_11 AC 140 ms
41,296 KB
testcase_12 AC 139 ms
41,248 KB
testcase_13 AC 135 ms
41,780 KB
testcase_14 AC 137 ms
41,284 KB
testcase_15 AC 135 ms
41,388 KB
testcase_16 AC 130 ms
41,252 KB
testcase_17 AC 129 ms
41,000 KB
testcase_18 AC 137 ms
41,572 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) {
				if(tmp % 10 == 3) {
					System.out.println(n);
					break;
				}
				tmp /= 10;
			}
		}

	}

}
0