結果

問題 No.207 世界のなんとか
ユーザー rf141rf141
提出日時 2015-06-28 16:28:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 159 ms / 5,000 ms
コード長 354 bytes
コンパイル時間 3,690 ms
コンパイル使用メモリ 74,848 KB
実行使用メモリ 41,600 KB
最終ジャッジ日時 2024-04-17 16:19:07
合計ジャッジ時間 7,781 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 140 ms
41,292 KB
testcase_01 AC 159 ms
41,168 KB
testcase_02 AC 158 ms
41,472 KB
testcase_03 AC 145 ms
41,140 KB
testcase_04 AC 144 ms
41,320 KB
testcase_05 AC 151 ms
41,116 KB
testcase_06 AC 139 ms
41,500 KB
testcase_07 AC 139 ms
41,180 KB
testcase_08 AC 140 ms
41,152 KB
testcase_09 AC 142 ms
41,564 KB
testcase_10 AC 143 ms
41,528 KB
testcase_11 AC 146 ms
40,980 KB
testcase_12 AC 144 ms
41,344 KB
testcase_13 AC 145 ms
41,600 KB
testcase_14 AC 145 ms
41,488 KB
testcase_15 AC 143 ms
41,216 KB
testcase_16 AC 138 ms
41,280 KB
testcase_17 AC 139 ms
41,552 KB
testcase_18 AC 122 ms
40,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class World{
	public static void main(String[] args){
		int n1,n2;
		Scanner scan = new Scanner(System.in);
		n1=scan.nextInt();
		n2=scan.nextInt();

		for(int i = n1;i<=n2;i++){
			if(i==1)continue;
			if(i%3==0){
				System.out.println(i);
			}else if(String.valueOf(i).indexOf("3")!= -1){System.out.println(i);
		}
		}
	}
}
0