結果

問題 No.207 世界のなんとか
ユーザー 37zigen37zigen
提出日時 2016-03-10 01:48:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 111 ms / 5,000 ms
コード長 360 bytes
コンパイル時間 1,618 ms
コンパイル使用メモリ 74,272 KB
実行使用メモリ 41,852 KB
最終ジャッジ日時 2024-04-17 16:40:05
合計ジャッジ時間 4,265 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
41,356 KB
testcase_01 AC 104 ms
41,184 KB
testcase_02 AC 111 ms
41,160 KB
testcase_03 AC 106 ms
41,012 KB
testcase_04 AC 107 ms
41,140 KB
testcase_05 AC 99 ms
41,692 KB
testcase_06 AC 104 ms
41,820 KB
testcase_07 AC 109 ms
41,396 KB
testcase_08 AC 107 ms
41,516 KB
testcase_09 AC 107 ms
41,096 KB
testcase_10 AC 110 ms
41,252 KB
testcase_11 AC 108 ms
41,380 KB
testcase_12 AC 100 ms
41,724 KB
testcase_13 AC 111 ms
41,644 KB
testcase_14 AC 107 ms
41,448 KB
testcase_15 AC 99 ms
41,560 KB
testcase_16 AC 90 ms
41,016 KB
testcase_17 AC 94 ms
41,272 KB
testcase_18 AC 104 ms
41,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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