結果

問題 No.312 置換処理
ユーザー gu_21816943gu_21816943
提出日時 2017-06-28 00:28:09
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 611 bytes
コンパイル時間 1,777 ms
コンパイル使用メモリ 74,444 KB
実行使用メモリ 51,336 KB
最終ジャッジ日時 2024-04-15 03:39:30
合計ジャッジ時間 5,193 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
50,372 KB
testcase_01 AC 66 ms
51,108 KB
testcase_02 AC 70 ms
51,336 KB
testcase_03 AC 71 ms
51,136 KB
testcase_04 AC 50 ms
50,484 KB
testcase_05 AC 50 ms
50,444 KB
testcase_06 AC 52 ms
50,464 KB
testcase_07 AC 61 ms
50,488 KB
testcase_08 AC 49 ms
50,300 KB
testcase_09 AC 50 ms
50,408 KB
testcase_10 AC 51 ms
50,488 KB
testcase_11 AC 54 ms
50,476 KB
testcase_12 AC 50 ms
50,288 KB
testcase_13 AC 50 ms
50,432 KB
testcase_14 AC 49 ms
50,560 KB
testcase_15 AC 49 ms
50,384 KB
testcase_16 AC 49 ms
50,500 KB
testcase_17 AC 50 ms
50,364 KB
testcase_18 AC 50 ms
50,344 KB
testcase_19 AC 50 ms
50,476 KB
testcase_20 AC 50 ms
50,396 KB
testcase_21 AC 50 ms
50,304 KB
testcase_22 AC 50 ms
50,496 KB
testcase_23 WA -
testcase_24 AC 51 ms
50,388 KB
testcase_25 AC 50 ms
50,392 KB
testcase_26 AC 49 ms
50,364 KB
testcase_27 AC 50 ms
50,436 KB
testcase_28 AC 51 ms
50,204 KB
testcase_29 AC 51 ms
50,340 KB
testcase_30 AC 54 ms
50,428 KB
testcase_31 AC 51 ms
50,476 KB
testcase_32 AC 54 ms
50,384 KB
testcase_33 AC 61 ms
50,208 KB
testcase_34 AC 61 ms
50,480 KB
testcase_35 AC 51 ms
50,336 KB
testcase_36 AC 50 ms
50,376 KB
testcase_37 AC 52 ms
50,448 KB
testcase_38 AC 50 ms
50,612 KB
testcase_39 AC 51 ms
50,272 KB
testcase_40 AC 51 ms
50,424 KB
testcase_41 AC 50 ms
50,396 KB
testcase_42 AC 49 ms
50,280 KB
testcase_43 AC 50 ms
50,528 KB
testcase_44 AC 50 ms
50,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

class Main {
	static PrintWriter out = new PrintWriter(System.out);
	static String str;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		long len = Long.parseLong(br.readLine());

		int i;
		double sqr=Math.sqrt(len);
		for(i=3;i<=sqr;i++){
			if(len%i==0){
				System.out.println(i);
				return;
			}
		}
		if(len%2==0){
			System.out.println(len/2);
			return;
		}
		System.out.println(len);
	}
}
0