結果

問題 No.207 世界のなんとか
ユーザー nCk_cv
提出日時 2015-09-19 14:58:27
言語 Java
(openjdk 23)
結果
AC  
実行時間 140 ms / 5,000 ms
コード長 525 bytes
コンパイル時間 2,270 ms
コンパイル使用メモリ 76,788 KB
実行使用メモリ 54,516 KB
最終ジャッジ日時 2024-10-09 10:33:15
合計ジャッジ時間 5,576 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

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