結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
49,988 KB
testcase_01 AC 61 ms
50,728 KB
testcase_02 AC 65 ms
51,048 KB
testcase_03 AC 65 ms
50,916 KB
testcase_04 AC 50 ms
50,224 KB
testcase_05 AC 50 ms
50,464 KB
testcase_06 AC 51 ms
50,496 KB
testcase_07 AC 55 ms
50,036 KB
testcase_08 AC 51 ms
50,064 KB
testcase_09 AC 51 ms
50,380 KB
testcase_10 AC 50 ms
50,028 KB
testcase_11 AC 53 ms
50,436 KB
testcase_12 AC 50 ms
50,544 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 51 ms
50,224 KB
testcase_23 WA -
testcase_24 AC 50 ms
50,168 KB
testcase_25 AC 50 ms
50,452 KB
testcase_26 AC 50 ms
50,468 KB
testcase_27 AC 49 ms
50,292 KB
testcase_28 AC 50 ms
50,420 KB
testcase_29 AC 50 ms
50,432 KB
testcase_30 AC 51 ms
50,184 KB
testcase_31 WA -
testcase_32 AC 50 ms
50,012 KB
testcase_33 AC 54 ms
50,116 KB
testcase_34 AC 54 ms
50,056 KB
testcase_35 AC 49 ms
50,476 KB
testcase_36 AC 50 ms
52,408 KB
testcase_37 AC 50 ms
50,524 KB
testcase_38 WA -
testcase_39 AC 50 ms
50,564 KB
testcase_40 AC 49 ms
50,016 KB
testcase_41 AC 51 ms
50,084 KB
testcase_42 AC 49 ms
50,612 KB
testcase_43 AC 49 ms
50,380 KB
testcase_44 WA -
権限があれば一括ダウンロードができます

ソースコード

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+=2){
			if(len%i==0){
				System.out.println(i);
				return;
			}
		}
		if(len%2==0){
			System.out.println(len/2);
			return;
		}
		System.out.println(len);
	}
}
0