結果

問題 No.207 世界のなんとか
ユーザー P48251659
提出日時 2015-06-14 03:24:22
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 488 bytes
コンパイル時間 2,826 ms
コンパイル使用メモリ 75,936 KB
実行使用メモリ 54,400 KB
最終ジャッジ日時 2024-07-06 20:00:49
合計ジャッジ時間 5,663 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class test2 {

	public static void main(String[] args) {

		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();

		while(++n<m) {
			if(n % 3 ==0) {
				System.out.println(n);
				continue;
			} else if(n % 10 == 3) {
				System.out.println(n);
				continue;
			}

			// なんだかなぁ
			int tmp = n;
			while(tmp > 10) {
				tmp = tmp /10;
			}
			if(tmp % 10 == 3) {
				System.out.println(n);
			}

		}

	}

}
0