結果

問題 No.312 置換処理
ユーザー todo_2mariko
提出日時 2019-03-20 16:09:51
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 344 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-19 00:43:44
合計ジャッジ時間 4,383 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 RE * 40
権限があれば一括ダウンロードができます

ソースコード

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.append(n)
    
ans = 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