結果

問題 No.207 世界のなんとか
ユーザー springspring
提出日時 2019-06-12 13:18:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 5,000 ms
コード長 359 bytes
コンパイル時間 2,016 ms
コンパイル使用メモリ 74,272 KB
実行使用メモリ 41,788 KB
最終ジャッジ日時 2024-04-18 10:52:15
合計ジャッジ時間 5,306 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,404 KB
testcase_01 AC 110 ms
41,436 KB
testcase_02 AC 135 ms
41,788 KB
testcase_03 AC 134 ms
40,772 KB
testcase_04 AC 130 ms
41,456 KB
testcase_05 AC 124 ms
40,140 KB
testcase_06 AC 132 ms
41,512 KB
testcase_07 AC 128 ms
40,904 KB
testcase_08 AC 132 ms
41,256 KB
testcase_09 AC 131 ms
41,136 KB
testcase_10 AC 133 ms
41,180 KB
testcase_11 AC 119 ms
41,172 KB
testcase_12 AC 138 ms
41,268 KB
testcase_13 AC 136 ms
41,532 KB
testcase_14 AC 131 ms
41,528 KB
testcase_15 AC 128 ms
41,488 KB
testcase_16 AC 130 ms
41,272 KB
testcase_17 AC 130 ms
41,412 KB
testcase_18 AC 130 ms
41,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int start = sc.nextInt();
		int end = sc.nextInt();
		sc.close();
		for(int i=start;i<=end;i++){
			String str = String.valueOf(i);
			if(i%3==0||str.contains("3")){
				System.out.println(i);
			}
		}
	}// mainmethod

} // class
0