結果

問題 No.207 世界のなんとか
ユーザー sayuen0sayuen0
提出日時 2018-06-17 15:39:46
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 543 bytes
コンパイル時間 2,703 ms
コンパイル使用メモリ 71,564 KB
実行使用メモリ 56,144 KB
最終ジャッジ日時 2023-09-13 06:21:07
合計ジャッジ時間 5,542 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 123 ms
55,892 KB
testcase_05 WA -
testcase_06 AC 119 ms
55,764 KB
testcase_07 AC 119 ms
55,592 KB
testcase_08 WA -
testcase_09 AC 123 ms
55,752 KB
testcase_10 WA -
testcase_11 AC 123 ms
56,144 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 123 ms
55,544 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 122 ms
55,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        String iPlusAToString;
        for(int i=1; i<=B-A+1; i++){
            iPlusAToString = String.valueOf(i+A);
            if((i+A)%3 == 0 &&(i+A < B)){
                System.out.println(i+A);
            }else if(iPlusAToString.contains("3") &&(i+A < B) ) {
            	System.out.println(i+A);
            }
        }
    }
}
0