結果

問題 No.207 世界のなんとか
ユーザー dogwood0424
提出日時 2017-11-28 00:15:22
言語 Java
(openjdk 23)
結果
TLE  
実行時間 -
コード長 476 bytes
コンパイル時間 2,990 ms
コンパイル使用メモリ 76,852 KB
実行使用メモリ 81,108 KB
最終ジャッジ日時 2024-11-27 11:56:09
合計ジャッジ時間 11,714 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No207 {
	public static void main(String[]args) {
		Scanner sc = new Scanner(System.in);
		int a,b;
		do {
			a=sc.nextInt();
			b=sc.nextInt();
		}while(!(b-a>=0 && b-a<=100));

		for(int i=a;i<b+1;i++) {
			if(i%3==0) {
				System.out.println(i);
			}
			else {
			int c = i;
			for(int j=10;j<b+1;j=j*10) {

				int d = c%10;
				 c = c/10;
				if(d==3 || c==3) {
					System.out.println(i);
					break;
				}

			}
			}
		}



	}

}
0