結果

問題 No.312 置換処理
ユーザー htensaihtensai
提出日時 2019-11-21 19:30:32
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 2,436 ms
コンパイル使用メモリ 74,192 KB
実行使用メモリ 54,512 KB
最終ジャッジ日時 2024-04-19 05:50:53
合計ジャッジ時間 9,028 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
54,096 KB
testcase_01 WA -
testcase_02 AC 146 ms
54,136 KB
testcase_03 WA -
testcase_04 AC 112 ms
52,876 KB
testcase_05 AC 115 ms
53,572 KB
testcase_06 AC 127 ms
54,020 KB
testcase_07 AC 133 ms
54,512 KB
testcase_08 AC 131 ms
54,044 KB
testcase_09 AC 125 ms
54,176 KB
testcase_10 AC 145 ms
53,160 KB
testcase_11 AC 134 ms
54,100 KB
testcase_12 AC 125 ms
54,172 KB
testcase_13 AC 133 ms
54,180 KB
testcase_14 AC 122 ms
54,268 KB
testcase_15 AC 114 ms
53,612 KB
testcase_16 AC 128 ms
54,424 KB
testcase_17 AC 129 ms
54,004 KB
testcase_18 AC 121 ms
54,276 KB
testcase_19 AC 123 ms
54,092 KB
testcase_20 AC 111 ms
54,484 KB
testcase_21 AC 114 ms
40,220 KB
testcase_22 AC 112 ms
40,032 KB
testcase_23 AC 117 ms
41,096 KB
testcase_24 AC 123 ms
41,448 KB
testcase_25 WA -
testcase_26 AC 122 ms
41,180 KB
testcase_27 WA -
testcase_28 AC 117 ms
40,972 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 122 ms
41,480 KB
testcase_32 AC 116 ms
40,284 KB
testcase_33 AC 117 ms
40,436 KB
testcase_34 AC 122 ms
41,028 KB
testcase_35 AC 122 ms
41,336 KB
testcase_36 AC 124 ms
41,536 KB
testcase_37 AC 110 ms
40,092 KB
testcase_38 AC 127 ms
41,616 KB
testcase_39 AC 133 ms
41,564 KB
testcase_40 AC 131 ms
41,500 KB
testcase_41 AC 118 ms
40,948 KB
testcase_42 AC 126 ms
41,400 KB
testcase_43 AC 124 ms
41,332 KB
testcase_44 AC 113 ms
40,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		for (long i = 3; i <= Math.sqrt(n); i++) {
		    if (n % i == 0) {
		        System.out.println(i);
		        return;
		    }
		}
	    System.out.println(n);
	}
}
0