結果

問題 No.207 世界のなんとか
ユーザー CavasiroCavasiro
提出日時 2020-04-15 01:14:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 144 ms / 5,000 ms
コード長 291 bytes
コンパイル時間 2,445 ms
コンパイル使用メモリ 74,900 KB
実行使用メモリ 54,444 KB
最終ジャッジ日時 2024-04-09 18:27:33
合計ジャッジ時間 5,983 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
53,956 KB
testcase_01 AC 133 ms
54,256 KB
testcase_02 AC 136 ms
54,220 KB
testcase_03 AC 134 ms
54,076 KB
testcase_04 AC 133 ms
53,968 KB
testcase_05 AC 140 ms
54,444 KB
testcase_06 AC 137 ms
54,004 KB
testcase_07 AC 134 ms
54,152 KB
testcase_08 AC 135 ms
54,204 KB
testcase_09 AC 139 ms
54,168 KB
testcase_10 AC 144 ms
54,332 KB
testcase_11 AC 139 ms
53,948 KB
testcase_12 AC 140 ms
54,248 KB
testcase_13 AC 140 ms
54,428 KB
testcase_14 AC 141 ms
54,112 KB
testcase_15 AC 141 ms
54,144 KB
testcase_16 AC 136 ms
54,228 KB
testcase_17 AC 137 ms
54,060 KB
testcase_18 AC 137 ms
54,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
 
class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		for(int i = a;i <= b;i++){
			if((i%3==0) || String.valueOf(i).contains("3")){
				System.out.println(i);
			}
		}
	}
}
0