結果

問題 No.207 世界のなんとか
ユーザー scache
提出日時 2015-09-19 14:43:06
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 620 bytes
コンパイル時間 3,435 ms
コンパイル使用メモリ 74,376 KB
実行使用メモリ 54,360 KB
最終ジャッジ日時 2024-07-19 07:56:37
合計ジャッジ時間 6,377 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 12
権限があれば一括ダウンロードができます

ソースコード

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){
					n/=10;
					if(n%10==3){
						System.out.println(m);
					}
				}
			}
		}
	}

}
0