結果

問題 No.207 世界のなんとか
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-14 17:23:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 412 bytes
コンパイル時間 1,919 ms
コンパイル使用メモリ 72,184 KB
実行使用メモリ 56,304 KB
最終ジャッジ日時 2023-08-11 02:26:08
合計ジャッジ時間 4,693 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
55,700 KB
testcase_01 AC 108 ms
55,940 KB
testcase_02 AC 114 ms
55,688 KB
testcase_03 AC 112 ms
55,736 KB
testcase_04 AC 109 ms
56,156 KB
testcase_05 AC 109 ms
55,968 KB
testcase_06 AC 105 ms
55,736 KB
testcase_07 AC 107 ms
55,692 KB
testcase_08 AC 108 ms
56,120 KB
testcase_09 AC 110 ms
55,808 KB
testcase_10 AC 115 ms
56,068 KB
testcase_11 AC 116 ms
56,068 KB
testcase_12 AC 117 ms
56,072 KB
testcase_13 AC 119 ms
56,304 KB
testcase_14 AC 113 ms
55,752 KB
testcase_15 AC 114 ms
55,368 KB
testcase_16 AC 109 ms
56,032 KB
testcase_17 AC 115 ms
55,824 KB
testcase_18 AC 110 ms
55,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	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++) {
			boolean bool = false;
			if(i % 3 == 0) {
				bool = true;
			}
			for(int j = i ; j > 0 ; j /= 10) {
				if(j % 10 == 3) {
					bool = true;
				}
			}
			if(bool) System.out.println(i);
		}
 	}
}
0