結果

問題 No.207 世界のなんとか
ユーザー yu_017
提出日時 2019-01-13 19:30:31
言語 Java
(openjdk 23)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 429 bytes
コンパイル時間 3,317 ms
コンパイル使用メモリ 74,572 KB
実行使用メモリ 41,520 KB
最終ジャッジ日時 2024-12-26 02:42:55
合計ジャッジ時間 6,710 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class A000207 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int st = sc.nextInt();
		int en = sc.nextInt();
		sc.close();
		for(int i = st;i<=en;i++) {
			if(i%3==0) {
				System.out.println(i);
				continue;
			}
			int c = i;
			while(true) {
				if(c%10==3) {
					System.out.println(i);
					break;
				}
				c /= 10;
				if(c==0)break;
			}
		}

	}
}
0