結果

問題 No.207 世界のなんとか
ユーザー ダンネックダンネック
提出日時 2020-05-24 12:03:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 2,995 ms
コンパイル使用メモリ 76,056 KB
実行使用メモリ 54,096 KB
最終ジャッジ日時 2024-04-19 11:02:06
合計ジャッジ時間 5,720 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
52,780 KB
testcase_01 AC 116 ms
54,092 KB
testcase_02 AC 106 ms
52,972 KB
testcase_03 AC 104 ms
52,976 KB
testcase_04 AC 104 ms
52,884 KB
testcase_05 AC 107 ms
52,976 KB
testcase_06 AC 112 ms
54,096 KB
testcase_07 AC 105 ms
52,708 KB
testcase_08 AC 114 ms
54,012 KB
testcase_09 AC 121 ms
53,864 KB
testcase_10 AC 108 ms
52,824 KB
testcase_11 AC 115 ms
53,996 KB
testcase_12 AC 102 ms
52,312 KB
testcase_13 AC 102 ms
52,548 KB
testcase_14 AC 103 ms
53,028 KB
testcase_15 AC 117 ms
53,928 KB
testcase_16 AC 102 ms
52,832 KB
testcase_17 AC 111 ms
54,052 KB
testcase_18 AC 102 ms
52,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;
public class length{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
	    int a = sc.nextInt();
	    int b = sc.nextInt();
	    int i;
	    for(i=a; i<=b;i++){
	        String s = Integer.toString(i);
	        if(i % 3 ==0||s.contains("3")){
	            System.out.println(i);
	        }
	    }
		sc.close();
    }
}
0