結果

問題 No.207 世界のなんとか
ユーザー nCk_cvnCk_cv
提出日時 2015-09-19 14:58:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 152 ms / 5,000 ms
コード長 525 bytes
コンパイル時間 2,204 ms
コンパイル使用メモリ 74,512 KB
実行使用メモリ 41,560 KB
最終ジャッジ日時 2024-04-17 16:26:06
合計ジャッジ時間 5,992 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
41,248 KB
testcase_01 AC 136 ms
41,252 KB
testcase_02 AC 143 ms
41,272 KB
testcase_03 AC 139 ms
41,440 KB
testcase_04 AC 150 ms
41,560 KB
testcase_05 AC 139 ms
41,244 KB
testcase_06 AC 145 ms
41,232 KB
testcase_07 AC 124 ms
40,188 KB
testcase_08 AC 134 ms
41,416 KB
testcase_09 AC 138 ms
41,404 KB
testcase_10 AC 152 ms
41,528 KB
testcase_11 AC 143 ms
41,212 KB
testcase_12 AC 136 ms
41,216 KB
testcase_13 AC 140 ms
41,304 KB
testcase_14 AC 148 ms
41,464 KB
testcase_15 AC 141 ms
40,876 KB
testcase_16 AC 136 ms
41,420 KB
testcase_17 AC 144 ms
41,272 KB
testcase_18 AC 144 ms
41,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
import java.io.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int A = sc.nextInt();
	    int B= sc.nextInt();
	    for(; A<=B; A++){
	        if(A%3==0){
	            System.out.println(A);
	            continue;
	        }
	        int tmp = A;
	        while(tmp!=0){
	            if(tmp%10==3){
	                System.out.println(A);
	                break;
	            }
	            tmp/=10;
	        }
	    }
	}

}
0