結果

問題 No.207 世界のなんとか
ユーザー ikawaiikawai
提出日時 2023-09-04 11:22:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 144 ms / 5,000 ms
コード長 365 bytes
コンパイル時間 2,361 ms
コンパイル使用メモリ 71,796 KB
実行使用メモリ 57,628 KB
最終ジャッジ日時 2023-09-04 11:22:46
合計ジャッジ時間 5,897 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,848 KB
testcase_01 AC 128 ms
55,612 KB
testcase_02 AC 132 ms
55,900 KB
testcase_03 AC 130 ms
55,488 KB
testcase_04 AC 130 ms
55,196 KB
testcase_05 AC 133 ms
57,628 KB
testcase_06 AC 128 ms
55,440 KB
testcase_07 AC 127 ms
55,448 KB
testcase_08 AC 127 ms
55,468 KB
testcase_09 AC 144 ms
55,424 KB
testcase_10 AC 134 ms
55,336 KB
testcase_11 AC 131 ms
55,196 KB
testcase_12 AC 133 ms
55,452 KB
testcase_13 AC 132 ms
55,716 KB
testcase_14 AC 133 ms
55,776 KB
testcase_15 AC 131 ms
55,532 KB
testcase_16 AC 127 ms
55,468 KB
testcase_17 AC 131 ms
55,224 KB
testcase_18 AC 126 ms
55,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Wandbox
{
    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++) {
    		String str = String.valueOf(i);
    		if (i % 3 == 0 || str.contains("3")) {
    			System.out.println(i);
    		}
    	} 
    }
}
0