結果

問題 No.207 世界のなんとか
ユーザー HaleakalaHaleakala
提出日時 2018-02-18 17:13:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 431 bytes
コンパイル時間 3,171 ms
コンパイル使用メモリ 72,276 KB
実行使用メモリ 56,216 KB
最終ジャッジ日時 2023-09-12 16:35:06
合計ジャッジ時間 6,372 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
54,408 KB
testcase_01 AC 113 ms
55,432 KB
testcase_02 AC 121 ms
55,780 KB
testcase_03 AC 119 ms
56,216 KB
testcase_04 AC 118 ms
55,512 KB
testcase_05 AC 121 ms
55,840 KB
testcase_06 AC 118 ms
55,848 KB
testcase_07 AC 113 ms
54,108 KB
testcase_08 AC 115 ms
55,484 KB
testcase_09 AC 118 ms
55,800 KB
testcase_10 AC 117 ms
55,908 KB
testcase_11 AC 122 ms
56,128 KB
testcase_12 AC 123 ms
56,180 KB
testcase_13 AC 118 ms
55,836 KB
testcase_14 AC 121 ms
56,184 KB
testcase_15 AC 121 ms
54,456 KB
testcase_16 AC 116 ms
55,920 KB
testcase_17 AC 113 ms
55,696 KB
testcase_18 AC 115 ms
56,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Answer {
	public static void main(String str[]) {
        Scanner sc = new Scanner(System.in);

        int a = Integer.valueOf(sc.next());
        int b = Integer.valueOf(sc.next());

        for(int i=a ; i<= b; i++) {
        	if(i % 3 == 0) {
        		System.out.println(i);
        	} else if(String.valueOf(i).contains("3")){
        		System.out.println(i);
        	}
        }
	}
}
0