結果

問題 No.192 合成数
ユーザー ぴろずぴろず
提出日時 2015-04-26 22:05:16
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 339 bytes
コンパイル時間 2,274 ms
コンパイル使用メモリ 74,928 KB
実行使用メモリ 54,288 KB
最終ジャッジ日時 2024-04-16 17:12:05
合計ジャッジ時間 7,507 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,440 KB
testcase_01 AC 136 ms
41,764 KB
testcase_02 AC 133 ms
41,220 KB
testcase_03 AC 135 ms
41,504 KB
testcase_04 AC 133 ms
41,656 KB
testcase_05 WA -
testcase_06 AC 135 ms
41,484 KB
testcase_07 AC 135 ms
41,368 KB
testcase_08 AC 135 ms
41,456 KB
testcase_09 AC 132 ms
41,664 KB
testcase_10 WA -
testcase_11 AC 133 ms
41,700 KB
testcase_12 WA -
testcase_13 AC 131 ms
41,884 KB
testcase_14 AC 131 ms
41,428 KB
testcase_15 AC 134 ms
41,448 KB
testcase_16 AC 133 ms
41,504 KB
testcase_17 AC 133 ms
41,792 KB
testcase_18 AC 119 ms
39,960 KB
testcase_19 WA -
testcase_20 AC 133 ms
41,540 KB
testcase_21 AC 133 ms
41,424 KB
testcase_22 AC 133 ms
41,484 KB
testcase_23 AC 132 ms
41,876 KB
testcase_24 AC 135 ms
41,760 KB
testcase_25 AC 132 ms
41,580 KB
testcase_26 AC 130 ms
41,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no192;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for(int i=n+100;i>=n-100;i++) {
			for(int j=2;j<i;j++) {
				if (i % j == 0) {
					System.out.println(i);
					return;
				}
			}
		}
		System.out.println("!?");
	}
}
0