結果

問題 No.207 世界のなんとか
ユーザー clamd
提出日時 2016-12-10 13:05:31
言語 Java
(openjdk 23)
結果
AC  
実行時間 147 ms / 5,000 ms
コード長 444 bytes
コンパイル時間 3,427 ms
コンパイル使用メモリ 74,460 KB
実行使用メモリ 54,336 KB
最終ジャッジ日時 2024-11-29 00:33:04
合計ジャッジ時間 6,957 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class world {

	public static void main(String[] args) {
		Scanner sn = new Scanner(System.in);
		int a = sn.nextInt();
		int b = sn.nextInt();
		sn.close();
		if (b - a >= 100) {
			return;
		}
		for (int i = a; i <= b; i++) {
			String s = String.valueOf(i);
			if (i % 3 == 0) {
				System.out.println(i);
			} else if (s.contains("3")) {
				System.out.println(i);
			} else {
				continue;
			}
		}
	}
}
0