結果

問題 No.207 世界のなんとか
ユーザー DevbotBotDevbotBot
提出日時 2015-06-18 17:02:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 467 bytes
コンパイル時間 2,186 ms
コンパイル使用メモリ 74,636 KB
実行使用メモリ 41,420 KB
最終ジャッジ日時 2024-04-17 16:16:45
合計ジャッジ時間 5,143 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
40,412 KB
testcase_01 AC 119 ms
41,300 KB
testcase_02 AC 127 ms
41,052 KB
testcase_03 AC 125 ms
41,172 KB
testcase_04 AC 126 ms
41,200 KB
testcase_05 AC 125 ms
39,948 KB
testcase_06 AC 126 ms
41,252 KB
testcase_07 AC 124 ms
41,164 KB
testcase_08 AC 121 ms
41,052 KB
testcase_09 AC 127 ms
41,284 KB
testcase_10 AC 129 ms
41,376 KB
testcase_11 AC 109 ms
39,760 KB
testcase_12 AC 130 ms
41,276 KB
testcase_13 AC 120 ms
40,048 KB
testcase_14 AC 137 ms
41,148 KB
testcase_15 AC 115 ms
40,064 KB
testcase_16 AC 125 ms
41,420 KB
testcase_17 AC 123 ms
41,236 KB
testcase_18 AC 119 ms
41,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class No207{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        Long a = sc.nextLong();
        Long b = sc.nextLong();
        for (Long i = a; i < b + 1; i++){
            if (i % 3 == 0){
                System.out.println(i);
            } else {
                if (String.valueOf(i).indexOf("3") > -1) {
                   System.out.println(i);
                }
            }
        }
    }
}
0