結果

問題 No.312 置換処理
ユーザー tsunabittsunabit
提出日時 2020-03-28 19:57:02
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 380 bytes
コンパイル時間 3,009 ms
コンパイル使用メモリ 72,412 KB
実行使用メモリ 56,656 KB
最終ジャッジ日時 2023-08-30 18:08:22
合計ジャッジ時間 10,306 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
56,232 KB
testcase_01 AC 127 ms
55,688 KB
testcase_02 AC 132 ms
55,848 KB
testcase_03 AC 132 ms
55,576 KB
testcase_04 AC 118 ms
55,632 KB
testcase_05 AC 118 ms
55,636 KB
testcase_06 AC 120 ms
55,912 KB
testcase_07 AC 124 ms
55,848 KB
testcase_08 AC 118 ms
55,912 KB
testcase_09 AC 118 ms
55,980 KB
testcase_10 AC 118 ms
55,972 KB
testcase_11 AC 122 ms
55,964 KB
testcase_12 AC 119 ms
55,612 KB
testcase_13 AC 119 ms
55,648 KB
testcase_14 AC 120 ms
56,036 KB
testcase_15 AC 119 ms
56,656 KB
testcase_16 AC 119 ms
55,744 KB
testcase_17 AC 119 ms
55,956 KB
testcase_18 AC 119 ms
55,732 KB
testcase_19 AC 118 ms
56,264 KB
testcase_20 AC 118 ms
56,224 KB
testcase_21 AC 120 ms
56,128 KB
testcase_22 AC 118 ms
55,952 KB
testcase_23 WA -
testcase_24 AC 118 ms
55,764 KB
testcase_25 AC 119 ms
56,048 KB
testcase_26 AC 119 ms
55,972 KB
testcase_27 AC 119 ms
56,140 KB
testcase_28 AC 118 ms
55,992 KB
testcase_29 AC 118 ms
56,264 KB
testcase_30 AC 123 ms
56,264 KB
testcase_31 AC 116 ms
56,480 KB
testcase_32 AC 121 ms
55,612 KB
testcase_33 AC 124 ms
56,624 KB
testcase_34 AC 125 ms
55,832 KB
testcase_35 AC 120 ms
55,708 KB
testcase_36 AC 118 ms
55,400 KB
testcase_37 AC 117 ms
55,860 KB
testcase_38 AC 117 ms
55,908 KB
testcase_39 AC 116 ms
55,668 KB
testcase_40 AC 118 ms
56,172 KB
testcase_41 AC 123 ms
55,744 KB
testcase_42 AC 117 ms
56,132 KB
testcase_43 AC 117 ms
56,252 KB
testcase_44 AC 117 ms
56,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

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