結果

問題 No.207 世界のなんとか
ユーザー FVRChanFVRChan
提出日時 2017-10-02 21:24:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 407 bytes
コンパイル時間 2,258 ms
コンパイル使用メモリ 74,360 KB
実行使用メモリ 54,404 KB
最終ジャッジ日時 2024-04-27 18:16:51
合計ジャッジ時間 5,476 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
53,800 KB
testcase_01 AC 131 ms
54,128 KB
testcase_02 AC 134 ms
54,156 KB
testcase_03 AC 131 ms
53,988 KB
testcase_04 AC 133 ms
53,788 KB
testcase_05 AC 134 ms
54,040 KB
testcase_06 AC 132 ms
54,000 KB
testcase_07 AC 135 ms
54,108 KB
testcase_08 AC 129 ms
53,668 KB
testcase_09 AC 136 ms
54,004 KB
testcase_10 AC 136 ms
54,056 KB
testcase_11 AC 134 ms
54,060 KB
testcase_12 AC 137 ms
54,176 KB
testcase_13 AC 134 ms
53,836 KB
testcase_14 AC 137 ms
54,036 KB
testcase_15 AC 133 ms
53,984 KB
testcase_16 AC 131 ms
53,736 KB
testcase_17 AC 131 ms
53,776 KB
testcase_18 AC 132 ms
54,404 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