結果

問題 No.207 世界のなんとか
ユーザー kou6839kou6839
提出日時 2015-05-18 12:36:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 660 bytes
コンパイル時間 2,198 ms
コンパイル使用メモリ 78,344 KB
実行使用メモリ 41,632 KB
最終ジャッジ日時 2024-04-17 16:08:20
合計ジャッジ時間 5,359 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
40,548 KB
testcase_01 AC 125 ms
41,160 KB
testcase_02 AC 117 ms
40,036 KB
testcase_03 AC 122 ms
40,204 KB
testcase_04 AC 129 ms
41,616 KB
testcase_05 AC 133 ms
41,096 KB
testcase_06 AC 111 ms
40,444 KB
testcase_07 AC 122 ms
41,156 KB
testcase_08 AC 123 ms
41,488 KB
testcase_09 AC 128 ms
41,632 KB
testcase_10 AC 131 ms
40,956 KB
testcase_11 AC 134 ms
41,428 KB
testcase_12 AC 122 ms
40,176 KB
testcase_13 AC 123 ms
40,304 KB
testcase_14 AC 131 ms
41,632 KB
testcase_15 AC 120 ms
40,096 KB
testcase_16 AC 118 ms
40,096 KB
testcase_17 AC 124 ms
40,556 KB
testcase_18 AC 127 ms
41,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;
import java.awt.geom.Point2D;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;

public class Main {
    public static void main(String[] args){
        // TODO 自動生成されたメソッド・スタブ
        Scanner sc = new Scanner(System.in);
        long a=sc.nextLong();
        Long b = sc.nextLong();
        for(long i=a;i<=b;i++){
        	String s = i+"";
        	if(i%3==0){
        		System.out.println(i);
        	}else if(s.indexOf('3')>=0){
        		System.out.println(i);
        	}
        }
    }
}
0