結果

問題 No.207 世界のなんとか
ユーザー brave_reverse_brave_reverse_
提出日時 2016-01-07 14:24:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 404 bytes
コンパイル時間 2,914 ms
コンパイル使用メモリ 74,336 KB
実行使用メモリ 41,424 KB
最終ジャッジ日時 2024-04-17 16:34:35
合計ジャッジ時間 5,934 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
40,004 KB
testcase_01 AC 120 ms
41,164 KB
testcase_02 AC 124 ms
41,424 KB
testcase_03 AC 121 ms
41,316 KB
testcase_04 AC 123 ms
41,076 KB
testcase_05 AC 124 ms
40,888 KB
testcase_06 AC 107 ms
40,124 KB
testcase_07 AC 106 ms
40,176 KB
testcase_08 AC 118 ms
41,144 KB
testcase_09 AC 115 ms
40,076 KB
testcase_10 AC 123 ms
41,076 KB
testcase_11 AC 120 ms
41,112 KB
testcase_12 AC 116 ms
40,364 KB
testcase_13 AC 122 ms
40,992 KB
testcase_14 AC 115 ms
40,300 KB
testcase_15 AC 120 ms
41,152 KB
testcase_16 AC 127 ms
40,976 KB
testcase_17 AC 134 ms
41,376 KB
testcase_18 AC 113 ms
39,896 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