結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 124 ms
56,232 KB
testcase_02 WA -
testcase_03 AC 126 ms
56,280 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 124 ms
55,888 KB
testcase_07 AC 123 ms
55,752 KB
testcase_08 AC 123 ms
55,972 KB
testcase_09 AC 129 ms
55,644 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 125 ms
55,784 KB
testcase_17 AC 124 ms
55,648 KB
testcase_18 AC 123 ms
56,016 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(int i=10;i<1000000000;i*=10){
					if(n%10==3){
						System.out.println(m);
					}
				
					n/=10;
				}
			}
		}
	}

}
0