結果

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

テストケース

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

ソースコード

diff #

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

while i * i <= n:
    while n % i == 0:
        n /= i
        table.add(i)
    i += 1

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