結果

問題 No.207 世界のなんとか
ユーザー marumaru
提出日時 2016-03-20 22:43:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 110 ms / 5,000 ms
コード長 450 bytes
コンパイル時間 3,589 ms
コンパイル使用メモリ 75,168 KB
実行使用メモリ 41,784 KB
最終ジャッジ日時 2024-04-17 16:40:47
合計ジャッジ時間 5,205 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
41,340 KB
testcase_01 AC 102 ms
41,440 KB
testcase_02 AC 110 ms
41,408 KB
testcase_03 AC 103 ms
41,208 KB
testcase_04 AC 102 ms
40,960 KB
testcase_05 AC 95 ms
41,672 KB
testcase_06 AC 106 ms
41,060 KB
testcase_07 AC 102 ms
41,424 KB
testcase_08 AC 98 ms
41,276 KB
testcase_09 AC 104 ms
41,308 KB
testcase_10 AC 104 ms
41,292 KB
testcase_11 AC 107 ms
41,188 KB
testcase_12 AC 94 ms
41,544 KB
testcase_13 AC 104 ms
41,108 KB
testcase_14 AC 105 ms
41,440 KB
testcase_15 AC 105 ms
41,784 KB
testcase_16 AC 104 ms
41,276 KB
testcase_17 AC 99 ms
41,260 KB
testcase_18 AC 93 ms
41,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class yukicoder_207 {
	public static void main(String[] args) {
	
		Scanner stdIn = new Scanner(System.in);
	
		String str = stdIn.nextLine();
		String[] array = str.split(" ");
	
		long a = Long.parseLong(array[0]);
		long b = Long.parseLong(array[1]);
	
		for (long i = a; i <= b; i++) {
			String s = String.valueOf(i);
			
			if ((i % 3 == 0) || (s.indexOf("3") != -1)) {
				System.out.println(i);
			}
		}
	}
}
0