結果

問題 No.207 世界のなんとか
ユーザー brave_reverse_brave_reverse_
提出日時 2016-01-07 14:24:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 404 bytes
コンパイル時間 3,474 ms
コンパイル使用メモリ 71,304 KB
実行使用メモリ 57,608 KB
最終ジャッジ日時 2023-07-30 15:29:00
合計ジャッジ時間 7,015 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,624 KB
testcase_01 AC 126 ms
55,656 KB
testcase_02 AC 131 ms
55,844 KB
testcase_03 AC 125 ms
56,004 KB
testcase_04 AC 122 ms
55,916 KB
testcase_05 AC 132 ms
55,808 KB
testcase_06 AC 126 ms
55,628 KB
testcase_07 AC 123 ms
55,624 KB
testcase_08 AC 125 ms
53,732 KB
testcase_09 AC 131 ms
55,976 KB
testcase_10 AC 130 ms
55,788 KB
testcase_11 AC 132 ms
55,788 KB
testcase_12 AC 134 ms
57,608 KB
testcase_13 AC 131 ms
55,600 KB
testcase_14 AC 133 ms
55,500 KB
testcase_15 AC 130 ms
55,516 KB
testcase_16 AC 123 ms
55,828 KB
testcase_17 AC 124 ms
55,792 KB
testcase_18 AC 126 ms
55,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicorder;
import java.util.Scanner;

public class QNo207 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		for(int n=a;n<=b;n++){
			if(n%3==0||exist3(n)) System.out.println(n);
		}
	}
	private static boolean exist3(int n){
		if(n==0) return false;
		if(n%10==3) return true;
		else return exist3(n/10);
	}

}
0