結果

問題 No.207 世界のなんとか
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-14 17:23:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 145 ms / 5,000 ms
コード長 412 bytes
コンパイル時間 2,134 ms
コンパイル使用メモリ 74,032 KB
実行使用メモリ 54,340 KB
最終ジャッジ日時 2024-04-28 19:34:53
合計ジャッジ時間 5,677 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
53,972 KB
testcase_01 AC 133 ms
53,768 KB
testcase_02 AC 145 ms
54,340 KB
testcase_03 AC 141 ms
54,208 KB
testcase_04 AC 133 ms
54,244 KB
testcase_05 AC 135 ms
54,112 KB
testcase_06 AC 137 ms
54,064 KB
testcase_07 AC 131 ms
53,832 KB
testcase_08 AC 135 ms
54,300 KB
testcase_09 AC 135 ms
54,240 KB
testcase_10 AC 136 ms
53,928 KB
testcase_11 AC 145 ms
54,064 KB
testcase_12 AC 136 ms
54,216 KB
testcase_13 AC 136 ms
54,196 KB
testcase_14 AC 136 ms
53,780 KB
testcase_15 AC 136 ms
54,128 KB
testcase_16 AC 133 ms
54,172 KB
testcase_17 AC 136 ms
53,916 KB
testcase_18 AC 129 ms
54,000 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