結果

問題 No.312 置換処理
ユーザー eitaho
提出日時 2015-12-05 00:09:20
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 270 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-14 13:41:49
合計ジャッジ時間 6,017 ms
ジャッジサーバーID
(参考情報)
judge6 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 32 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

N = int(input())
ans = N
root = int(math.sqrt(N))
for i in range(1, root + 1):
    if N % i == 0:
        b = N // i
        if i % 2 == 1 and i >= 3:
            ans = min(ans, i)
        if b % 2 == 1 and b >= 3:
            ans = min(ans, b)

print(ans)
0