結果

問題 No.207 世界のなんとか
ユーザー scachescache
提出日時 2015-09-19 14:55:52
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 623 bytes
コンパイル時間 3,155 ms
コンパイル使用メモリ 71,680 KB
実行使用メモリ 56,412 KB
最終ジャッジ日時 2023-09-26 13:37:50
合計ジャッジ時間 6,580 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 124 ms
55,444 KB
testcase_02 WA -
testcase_03 AC 124 ms
56,036 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 125 ms
55,944 KB
testcase_07 AC 125 ms
55,456 KB
testcase_08 AC 126 ms
55,636 KB
testcase_09 AC 131 ms
55,748 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 127 ms
56,088 KB
testcase_17 AC 127 ms
55,816 KB
testcase_18 AC 127 ms
55,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


import java.util.Scanner;

/**
 * アルゴリズム勉強会 第33回
 * yukicoder no.207 世界のなんとか
 * @author scache
 *
 */
public class Main207 {
	public static void main(String[] args) {
		Main207 p = new Main207();
	}

	public Main207() {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b =sc.nextInt();
		
		solve(a,b);
	}

	public void solve(int a, int b) {
		
		for(int m=a;m<=b;m++){
			if(m%3==0){
				System.out.println(m);
			}else{
				int n = m;
				for(long i=10;i<10000000000L;i*=10){
					if(n%10==3){
						System.out.println(m);
					}
					n/=10;
				}
			}
		}
	}

}
0