結果

問題 No.207 世界のなんとか
ユーザー 👑 はまやんはまやんはまやんはまやん
提出日時 2016-05-14 13:56:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 613 bytes
コンパイル時間 2,387 ms
コンパイル使用メモリ 74,572 KB
実行使用メモリ 54,476 KB
最終ジャッジ日時 2024-04-17 16:48:19
合計ジャッジ時間 4,934 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
54,232 KB
testcase_01 AC 108 ms
52,832 KB
testcase_02 AC 125 ms
54,028 KB
testcase_03 AC 123 ms
53,960 KB
testcase_04 AC 115 ms
54,004 KB
testcase_05 AC 121 ms
54,072 KB
testcase_06 AC 117 ms
54,128 KB
testcase_07 AC 108 ms
52,872 KB
testcase_08 AC 120 ms
54,264 KB
testcase_09 AC 120 ms
53,756 KB
testcase_10 AC 123 ms
54,364 KB
testcase_11 AC 124 ms
54,152 KB
testcase_12 AC 121 ms
54,264 KB
testcase_13 AC 118 ms
53,972 KB
testcase_14 AC 115 ms
54,124 KB
testcase_15 AC 125 ms
54,396 KB
testcase_16 AC 110 ms
53,572 KB
testcase_17 AC 116 ms
54,476 KB
testcase_18 AC 105 ms
52,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		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);
				continue;
			}
			
			int j = i;
			boolean ok = false;
			while(0 < j)
			{
				if(j % 10 == 3) ok = true;
				j /= 10;
			}
			if(ok) System.out.println(i);
		}
	}
}
0