結果

問題 No.207 世界のなんとか
ユーザー kaoetayakaoetaya
提出日時 2016-12-07 21:50:20
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 498 bytes
コンパイル時間 3,484 ms
コンパイル使用メモリ 73,916 KB
実行使用メモリ 57,800 KB
最終ジャッジ日時 2023-08-18 19:52:27
合計ジャッジ時間 7,213 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 129 ms
55,772 KB
testcase_02 WA -
testcase_03 AC 127 ms
55,672 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 126 ms
55,564 KB
testcase_07 AC 127 ms
55,808 KB
testcase_08 AC 128 ms
55,772 KB
testcase_09 AC 129 ms
55,884 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 124 ms
55,952 KB
testcase_17 AC 124 ms
55,896 KB
testcase_18 AC 124 ms
55,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Test{
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        int a = s.nextInt(),b = s.nextInt();

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

        		for(int j=0;j<str.length();j++){
        			if(str.charAt(j) == '3'){
        				System.out.println(i);
        			}
        		}
        	}
        }
    }
}
0