結果

問題 No.192 合成数
ユーザー sasakkisasakki
提出日時 2016-04-11 17:18:56
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 387 bytes
コンパイル時間 2,084 ms
コンパイル使用メモリ 74,452 KB
実行使用メモリ 41,456 KB
最終ジャッジ日時 2024-04-16 17:19:52
合計ジャッジ時間 6,702 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
40,164 KB
testcase_01 AC 124 ms
40,916 KB
testcase_02 AC 124 ms
41,128 KB
testcase_03 AC 126 ms
41,056 KB
testcase_04 AC 127 ms
41,288 KB
testcase_05 AC 129 ms
41,052 KB
testcase_06 AC 124 ms
41,136 KB
testcase_07 AC 122 ms
41,180 KB
testcase_08 AC 124 ms
41,236 KB
testcase_09 AC 122 ms
41,096 KB
testcase_10 AC 125 ms
41,248 KB
testcase_11 AC 123 ms
41,120 KB
testcase_12 AC 123 ms
41,236 KB
testcase_13 AC 122 ms
41,132 KB
testcase_14 AC 121 ms
41,032 KB
testcase_15 AC 121 ms
41,300 KB
testcase_16 AC 108 ms
40,224 KB
testcase_17 WA -
testcase_18 AC 112 ms
40,132 KB
testcase_19 AC 110 ms
39,956 KB
testcase_20 AC 126 ms
41,300 KB
testcase_21 AC 125 ms
40,976 KB
testcase_22 AC 124 ms
41,240 KB
testcase_23 AC 121 ms
41,160 KB
testcase_24 AC 122 ms
41,300 KB
testcase_25 AC 121 ms
41,456 KB
testcase_26 AC 112 ms
40,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

		int N = Integer.parseInt(sc.next());

		for(int i = N - 100; i <= N + 100; i++){
			if(1 <= i && i <= 3){
				continue;
			}
			else if(i % 2 == 1 && ( i % 3 == 0 || i % 5 == 0) ){
				continue;
			}
			else{
				System.out.println(i);
				break;
			}	   
		}
	}
}
0