結果

問題 No.207 世界のなんとか
ユーザー shinwisteriashinwisteria
提出日時 2017-03-18 18:23:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 386 bytes
コンパイル時間 5,176 ms
コンパイル使用メモリ 72,108 KB
実行使用メモリ 56,008 KB
最終ジャッジ日時 2023-09-18 02:31:03
合計ジャッジ時間 7,477 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,324 KB
testcase_01 AC 126 ms
55,948 KB
testcase_02 AC 133 ms
55,620 KB
testcase_03 AC 130 ms
56,008 KB
testcase_04 AC 123 ms
55,468 KB
testcase_05 AC 130 ms
55,572 KB
testcase_06 AC 127 ms
53,804 KB
testcase_07 AC 124 ms
55,884 KB
testcase_08 AC 124 ms
55,744 KB
testcase_09 AC 132 ms
55,504 KB
testcase_10 AC 131 ms
55,268 KB
testcase_11 AC 129 ms
55,308 KB
testcase_12 AC 131 ms
55,768 KB
testcase_13 AC 131 ms
55,336 KB
testcase_14 AC 130 ms
55,388 KB
testcase_15 AC 131 ms
55,776 KB
testcase_16 AC 123 ms
53,860 KB
testcase_17 AC 125 ms
55,552 KB
testcase_18 AC 123 ms
55,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Three {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int A = s.nextInt() , B = s.nextInt();
		s.close();
		for(int i = A;i <= B;i++){
			if(i % 3 == 0){
				System.out.println(i);
			}else{
				String str = String.valueOf(i);
				if(str.indexOf("3") != -1){
					System.out.println(i);
				}
			}
		}

	}

}
0