結果

問題 No.207 世界のなんとか
ユーザー veroomveroom
提出日時 2016-10-10 14:13:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 5,000 ms
コード長 640 bytes
コンパイル時間 5,066 ms
コンパイル使用メモリ 74,788 KB
実行使用メモリ 54,724 KB
最終ジャッジ日時 2024-05-01 18:54:30
合計ジャッジ時間 8,171 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
54,080 KB
testcase_01 AC 113 ms
53,964 KB
testcase_02 AC 116 ms
53,796 KB
testcase_03 AC 100 ms
52,976 KB
testcase_04 AC 121 ms
53,916 KB
testcase_05 AC 119 ms
53,760 KB
testcase_06 AC 106 ms
54,724 KB
testcase_07 AC 101 ms
52,876 KB
testcase_08 AC 119 ms
54,032 KB
testcase_09 AC 107 ms
53,044 KB
testcase_10 AC 107 ms
52,928 KB
testcase_11 AC 118 ms
54,164 KB
testcase_12 AC 108 ms
53,020 KB
testcase_13 AC 116 ms
53,768 KB
testcase_14 AC 110 ms
52,764 KB
testcase_15 AC 118 ms
52,988 KB
testcase_16 AC 112 ms
53,840 KB
testcase_17 AC 111 ms
54,084 KB
testcase_18 AC 111 ms
54,044 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Yukicoder {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		boolean D = false;

		for (int i = A; i <= B; i++) {

			String j = String.valueOf(i);
			String[] strArray = new String[j.length()];
			for (int m = 0; m < j.length(); m++) {
				String str2 = String.valueOf(j.charAt(m));
				strArray[m] = str2;
				int a = Integer.valueOf(strArray[m]);
				if (a == 3) {
					D = true;
					break;
				}
			}
			if (D == true || (i % 3) == 0) {
				System.out.println(i);
			}
			D = false;
		}
	}
}
0