結果

問題 No.207 世界のなんとか
ユーザー AoiroFukurouAoiroFukurou
提出日時 2015-05-31 14:23:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 436 bytes
コンパイル時間 3,160 ms
コンパイル使用メモリ 74,296 KB
実行使用メモリ 41,592 KB
最終ジャッジ日時 2024-04-17 16:13:56
合計ジャッジ時間 6,285 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
41,152 KB
testcase_01 AC 115 ms
41,104 KB
testcase_02 AC 114 ms
39,708 KB
testcase_03 AC 123 ms
41,592 KB
testcase_04 AC 127 ms
41,272 KB
testcase_05 AC 115 ms
39,908 KB
testcase_06 AC 123 ms
41,052 KB
testcase_07 AC 118 ms
41,252 KB
testcase_08 AC 115 ms
41,276 KB
testcase_09 AC 115 ms
40,428 KB
testcase_10 AC 111 ms
40,156 KB
testcase_11 AC 124 ms
41,124 KB
testcase_12 AC 130 ms
41,472 KB
testcase_13 AC 126 ms
41,140 KB
testcase_14 AC 126 ms
41,252 KB
testcase_15 AC 128 ms
41,340 KB
testcase_16 AC 125 ms
41,060 KB
testcase_17 AC 123 ms
41,136 KB
testcase_18 AC 122 ms
41,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package b2015_5_31;

import java.util.Scanner;

public class SekaiNantoka {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	for(int i=a; i<=b; i++){
	if(match(i)){
		System.out.println(i);
	}
	}

}

private static boolean match(int i){
	if(i%3==0){
		return true;
	}
	while(i>0){
		if(i%10==3){
			return true;
		}else{
			i /= 10;
		}
	}
		return false;
}
}
0