結果

問題 No.207 世界のなんとか
ユーザー FVRChanFVRChan
提出日時 2017-10-02 21:24:30
言語 Java19
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 407 bytes
コンパイル時間 2,370 ms
コンパイル使用メモリ 72,040 KB
実行使用メモリ 56,492 KB
最終ジャッジ日時 2023-08-10 00:12:37
合計ジャッジ時間 5,374 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,824 KB
testcase_01 AC 124 ms
55,828 KB
testcase_02 AC 131 ms
55,592 KB
testcase_03 AC 129 ms
55,892 KB
testcase_04 AC 124 ms
56,108 KB
testcase_05 AC 129 ms
55,864 KB
testcase_06 AC 126 ms
55,744 KB
testcase_07 AC 125 ms
55,532 KB
testcase_08 AC 125 ms
55,504 KB
testcase_09 AC 128 ms
55,668 KB
testcase_10 AC 129 ms
56,492 KB
testcase_11 AC 126 ms
55,800 KB
testcase_12 AC 128 ms
55,820 KB
testcase_13 AC 129 ms
55,464 KB
testcase_14 AC 129 ms
56,016 KB
testcase_15 AC 130 ms
55,892 KB
testcase_16 AC 126 ms
55,664 KB
testcase_17 AC 125 ms
56,072 KB
testcase_18 AC 126 ms
55,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main{
	private static Scanner sc=new Scanner(System.in);
	public static void main(String args[])throws Exception{
		int a=sc.nextInt(),b=sc.nextInt();
		for(int i=a;i<=b;i++){
			if(i%3==0 || in3(i)){
				System.out.println(i);
			}
		}
	}
	private static boolean in3(int i){
		String s=String.valueOf(i);
		if(s.indexOf("3")==-1)return false;
		else return true;
	}
}
0