結果

問題 No.207 世界のなんとか
ユーザー KinoshitaKinoshita
提出日時 2015-09-19 14:24:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 111 ms / 5,000 ms
コード長 444 bytes
コンパイル時間 1,829 ms
コンパイル使用メモリ 74,456 KB
実行使用メモリ 41,600 KB
最終ジャッジ日時 2024-04-17 16:24:32
合計ジャッジ時間 4,293 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
39,900 KB
testcase_01 AC 107 ms
40,340 KB
testcase_02 AC 109 ms
40,160 KB
testcase_03 AC 96 ms
40,264 KB
testcase_04 AC 105 ms
41,160 KB
testcase_05 AC 111 ms
41,488 KB
testcase_06 AC 92 ms
41,336 KB
testcase_07 AC 93 ms
41,324 KB
testcase_08 AC 103 ms
40,948 KB
testcase_09 AC 110 ms
41,132 KB
testcase_10 AC 109 ms
41,600 KB
testcase_11 AC 109 ms
41,044 KB
testcase_12 AC 107 ms
41,468 KB
testcase_13 AC 107 ms
41,064 KB
testcase_14 AC 97 ms
41,284 KB
testcase_15 AC 106 ms
40,468 KB
testcase_16 AC 101 ms
40,220 KB
testcase_17 AC 93 ms
41,052 KB
testcase_18 AC 105 ms
41,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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++){
			String str = String.valueOf(i);
			
			if(i % 3 == 0){
				System.out.println(i);
				continue;
			}
			for(int j = 0; j < str.length(); j++){
				if(str.charAt(j) == '3'){
					System.out.println(i);
					break;
				}
				
			}
		}
	}
}
0