結果

問題 No.207 世界のなんとか
ユーザー Mcpu3
提出日時 2018-06-21 22:58:45
言語 Java
(openjdk 23)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 385 bytes
コンパイル時間 2,001 ms
コンパイル使用メモリ 74,356 KB
実行使用メモリ 41,404 KB
最終ジャッジ日時 2024-06-30 17:45:11
合計ジャッジ時間 5,318 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no207{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a,b,i,t,s;
		a=stdIn.nextInt();
		b=stdIn.nextInt();
		for(i=a;i<=b;i++) {
			s=0;
			t=i;
			do {
				if(t%10==3) {
					s++;
					break;
				}
				t/=10;
			}while(t!=0);
			if(i%3==0) s++;
			if(s!=0) System.out.println(i);
		}
	}
}
0