結果

問題 No.207 世界のなんとか
ユーザー sasakkisasakki
提出日時 2016-03-12 17:53:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 112 ms / 5,000 ms
コード長 504 bytes
コンパイル時間 2,289 ms
コンパイル使用メモリ 77,636 KB
実行使用メモリ 41,716 KB
最終ジャッジ日時 2024-04-17 16:40:25
合計ジャッジ時間 4,363 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
41,552 KB
testcase_01 AC 104 ms
41,572 KB
testcase_02 AC 98 ms
40,460 KB
testcase_03 AC 104 ms
41,440 KB
testcase_04 AC 111 ms
41,392 KB
testcase_05 AC 107 ms
40,300 KB
testcase_06 AC 107 ms
40,984 KB
testcase_07 AC 107 ms
41,668 KB
testcase_08 AC 112 ms
41,664 KB
testcase_09 AC 107 ms
41,476 KB
testcase_10 AC 106 ms
41,476 KB
testcase_11 AC 107 ms
40,216 KB
testcase_12 AC 100 ms
41,156 KB
testcase_13 AC 109 ms
41,300 KB
testcase_14 AC 101 ms
41,716 KB
testcase_15 AC 100 ms
41,276 KB
testcase_16 AC 94 ms
41,636 KB
testcase_17 AC 107 ms
41,292 KB
testcase_18 AC 103 ms
41,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class main{
    public static void main(String args[]){

	Scanner scan = new Scanner(System.in);

	int A = scan.nextInt();
	int B = scan.nextInt();

	for(int i = A; i <= B; i++){
	    if(i % 3 == 0){
		System.out.println(i);
	    }
	    else{
		int num = i;

		while(true){
		    if(num % 10 == 3){
			num = num / 10;
			System.out.println(i);
			break;
		    }
		    else{
			num = num / 10;
			if(num == 0){
			    break;
			}
		    }
		    
		    
		}
		
	    }
	}
	
    }
}
0