結果

問題 No.207 世界のなんとか
ユーザー AoiroFukurouAoiroFukurou
提出日時 2016-05-14 13:54:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 143 ms / 5,000 ms
コード長 379 bytes
コンパイル時間 3,566 ms
コンパイル使用メモリ 75,564 KB
実行使用メモリ 41,596 KB
最終ジャッジ日時 2024-04-17 16:48:12
合計ジャッジ時間 7,148 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
41,304 KB
testcase_01 AC 139 ms
41,468 KB
testcase_02 AC 143 ms
41,120 KB
testcase_03 AC 141 ms
41,468 KB
testcase_04 AC 136 ms
41,320 KB
testcase_05 AC 141 ms
41,200 KB
testcase_06 AC 133 ms
41,320 KB
testcase_07 AC 136 ms
41,244 KB
testcase_08 AC 123 ms
39,952 KB
testcase_09 AC 139 ms
41,596 KB
testcase_10 AC 140 ms
41,068 KB
testcase_11 AC 129 ms
40,192 KB
testcase_12 AC 141 ms
40,888 KB
testcase_13 AC 139 ms
41,384 KB
testcase_14 AC 141 ms
41,312 KB
testcase_15 AC 139 ms
41,328 KB
testcase_16 AC 133 ms
41,344 KB
testcase_17 AC 134 ms
41,180 KB
testcase_18 AC 134 ms
40,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class No207 {
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(i%3==0){
			System.out.println(i);
		}else{
			String s = Integer.toString(i);
			if(s.indexOf("3") != -1){
				System.out.println(i);
			}
		}
	}
}
}
0