結果

問題 No.312 置換処理
ユーザー todo_2marikotodo_2mariko
提出日時 2019-03-20 16:12:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 349 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 11,848 KB
実行使用メモリ 10,076 KB
最終ジャッジ日時 2023-10-19 04:27:21
合計ジャッジ時間 4,219 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
10,076 KB
testcase_01 WA -
testcase_02 AC 356 ms
10,044 KB
testcase_03 WA -
testcase_04 AC 29 ms
10,044 KB
testcase_05 AC 38 ms
10,076 KB
testcase_06 WA -
testcase_07 AC 116 ms
10,076 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 58 ms
10,076 KB
testcase_12 WA -
testcase_13 AC 30 ms
10,076 KB
testcase_14 AC 30 ms
10,076 KB
testcase_15 AC 46 ms
10,076 KB
testcase_16 AC 33 ms
10,076 KB
testcase_17 AC 67 ms
10,076 KB
testcase_18 AC 33 ms
10,076 KB
testcase_19 AC 31 ms
10,076 KB
testcase_20 AC 49 ms
10,076 KB
testcase_21 AC 31 ms
10,076 KB
testcase_22 AC 30 ms
10,044 KB
testcase_23 AC 30 ms
10,076 KB
testcase_24 AC 29 ms
10,044 KB
testcase_25 AC 30 ms
10,076 KB
testcase_26 AC 30 ms
10,044 KB
testcase_27 AC 30 ms
10,076 KB
testcase_28 AC 30 ms
10,076 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 69 ms
10,076 KB
testcase_32 AC 59 ms
10,044 KB
testcase_33 AC 124 ms
10,044 KB
testcase_34 AC 126 ms
10,044 KB
testcase_35 AC 40 ms
10,076 KB
testcase_36 AC 29 ms
10,076 KB
testcase_37 AC 30 ms
10,076 KB
testcase_38 AC 30 ms
10,076 KB
testcase_39 AC 30 ms
10,076 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 31 ms
10,076 KB
testcase_43 AC 29 ms
10,076 KB
testcase_44 AC 30 ms
10,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
table = set()
i = 2

while i * i <= n:
    while n % i == 0:
        n /= i
        table.add(i)
    i += 1
if n > 1:
    table.add(n)
    
ans = sorted(list(table))
if len(ans) >= 2:
    if ans[1] == 3:
        print(3)
    elif ans[0] == 2:
        print(4)
    else:
        print(ans[0])
else:
    print([4, ans[0]][ans[0]!=2])
0