結果

問題 No.207 世界のなんとか
ユーザー KatoooooKatooooo
提出日時 2017-09-11 22:56:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 464 bytes
コンパイル時間 2,048 ms
コンパイル使用メモリ 74,220 KB
実行使用メモリ 41,412 KB
最終ジャッジ日時 2024-04-25 06:58:09
合計ジャッジ時間 5,158 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
39,912 KB
testcase_01 AC 127 ms
40,840 KB
testcase_02 AC 131 ms
41,412 KB
testcase_03 AC 123 ms
39,944 KB
testcase_04 AC 129 ms
41,252 KB
testcase_05 AC 126 ms
40,960 KB
testcase_06 AC 126 ms
41,080 KB
testcase_07 AC 129 ms
41,204 KB
testcase_08 AC 124 ms
40,992 KB
testcase_09 AC 128 ms
41,080 KB
testcase_10 AC 132 ms
41,396 KB
testcase_11 AC 127 ms
41,132 KB
testcase_12 AC 130 ms
41,092 KB
testcase_13 AC 130 ms
41,108 KB
testcase_14 AC 121 ms
40,484 KB
testcase_15 AC 116 ms
39,880 KB
testcase_16 AC 123 ms
41,232 KB
testcase_17 AC 120 ms
40,976 KB
testcase_18 AC 118 ms
40,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.Arrays;

public class Main {
    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 if(Integer.toString(i).contains("3")){
                System.out.println(i);
            }
        }
        
    }
}
0