結果

問題 No.207 世界のなんとか
ユーザー Mcpu3Mcpu3
提出日時 2018-06-21 22:58:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 385 bytes
コンパイル時間 3,431 ms
コンパイル使用メモリ 71,788 KB
実行使用メモリ 56,220 KB
最終ジャッジ日時 2023-09-13 07:42:27
合計ジャッジ時間 5,741 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,884 KB
testcase_01 AC 126 ms
55,956 KB
testcase_02 AC 132 ms
55,784 KB
testcase_03 AC 129 ms
55,912 KB
testcase_04 AC 126 ms
55,488 KB
testcase_05 AC 133 ms
55,720 KB
testcase_06 AC 125 ms
55,796 KB
testcase_07 AC 125 ms
55,856 KB
testcase_08 AC 127 ms
55,916 KB
testcase_09 AC 130 ms
55,736 KB
testcase_10 AC 132 ms
55,860 KB
testcase_11 AC 130 ms
53,976 KB
testcase_12 AC 133 ms
56,220 KB
testcase_13 AC 131 ms
56,024 KB
testcase_14 AC 131 ms
55,540 KB
testcase_15 AC 130 ms
55,780 KB
testcase_16 AC 127 ms
56,192 KB
testcase_17 AC 126 ms
55,948 KB
testcase_18 AC 127 ms
55,728 KB
権限があれば一括ダウンロードができます

ソースコード

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