結果

問題 No.192 合成数
ユーザー 37zigen37zigen
提出日時 2016-03-31 12:24:14
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 309 bytes
コンパイル時間 2,241 ms
コンパイル使用メモリ 74,300 KB
実行使用メモリ 54,396 KB
最終ジャッジ日時 2024-04-16 17:19:40
合計ジャッジ時間 7,503 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 138 ms
41,404 KB
testcase_02 AC 145 ms
41,592 KB
testcase_03 AC 139 ms
41,052 KB
testcase_04 AC 140 ms
41,184 KB
testcase_05 AC 135 ms
41,000 KB
testcase_06 AC 135 ms
41,272 KB
testcase_07 AC 134 ms
41,052 KB
testcase_08 AC 139 ms
41,180 KB
testcase_09 AC 140 ms
40,984 KB
testcase_10 AC 137 ms
41,172 KB
testcase_11 AC 136 ms
41,368 KB
testcase_12 AC 137 ms
41,128 KB
testcase_13 AC 135 ms
41,224 KB
testcase_14 AC 134 ms
41,488 KB
testcase_15 AC 135 ms
41,516 KB
testcase_16 AC 137 ms
41,688 KB
testcase_17 WA -
testcase_18 AC 128 ms
41,724 KB
testcase_19 AC 135 ms
41,352 KB
testcase_20 AC 134 ms
41,440 KB
testcase_21 AC 136 ms
41,432 KB
testcase_22 AC 137 ms
41,584 KB
testcase_23 WA -
testcase_24 AC 135 ms
41,700 KB
testcase_25 AC 142 ms
41,184 KB
testcase_26 AC 141 ms
41,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder192;
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=-100;i<=100;i++){
			for(int j=2;j<=n+i;j++){
				if((n+i)%j==0){
					System.out.println(n+i);
					return;
				}
			}
		}
	}
}
0