結果

問題 No.207 世界のなんとか
ユーザー mazeppa1108mazeppa1108
提出日時 2015-09-19 14:52:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 358 bytes
コンパイル時間 2,667 ms
コンパイル使用メモリ 75,084 KB
実行使用メモリ 41,596 KB
最終ジャッジ日時 2024-04-17 16:25:48
合計ジャッジ時間 5,493 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
41,280 KB
testcase_01 AC 107 ms
41,440 KB
testcase_02 AC 112 ms
41,404 KB
testcase_03 AC 105 ms
41,380 KB
testcase_04 AC 106 ms
41,260 KB
testcase_05 AC 99 ms
41,376 KB
testcase_06 AC 102 ms
40,996 KB
testcase_07 AC 103 ms
41,212 KB
testcase_08 AC 104 ms
41,024 KB
testcase_09 AC 104 ms
41,492 KB
testcase_10 AC 107 ms
41,368 KB
testcase_11 AC 108 ms
40,364 KB
testcase_12 AC 99 ms
41,596 KB
testcase_13 AC 109 ms
41,584 KB
testcase_14 AC 108 ms
41,492 KB
testcase_15 AC 99 ms
41,380 KB
testcase_16 AC 96 ms
39,860 KB
testcase_17 AC 109 ms
41,100 KB
testcase_18 AC 97 ms
41,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package hokuAlgo31;
import java.util.*;

public class Main1 {
	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) {
				System.out.println(i);
			} else if(String.valueOf(i).contains("3")) {
				System.out.println(i);
			}
		}
	}
}
0