結果

問題 No.207 世界のなんとか
ユーザー fal_rnd
提出日時 2017-03-31 15:55:20
言語 Java
(openjdk 23)
結果
AC  
実行時間 112 ms / 5,000 ms
コード長 471 bytes
コンパイル時間 1,883 ms
コンパイル使用メモリ 74,312 KB
実行使用メモリ 55,988 KB
最終ジャッジ日時 2024-07-07 04:42:57
合計ジャッジ時間 4,519 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{

	static Scanner s=new Scanner(System.in);

	public static void main(String __[]){
		input();
		solve();
	}

	private static void input(){
	}

	private static void solve(){
		int a=s.nextInt(),b=s.nextInt(),buf;
		for(int i=a;i<=b;i++) {
			if(i%3==0)
				System.out.println(i);
			else {
				buf=i;
				while(buf>0) {
					if((buf%10)==3) {
						System.out.println(i);
						break;
					}
					buf/=10;
				}
			}
		}
	}
}
0