結果

問題 No.1737 One to N
ユーザー titiatitia
提出日時 2021-11-12 21:51:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 974 ms
コンパイル使用メモリ 10,532 KB
実行使用メモリ 8,284 KB
最終ジャッジ日時 2023-08-17 01:02:41
合計ジャッジ時間 1,886 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,164 KB
testcase_01 AC 17 ms
8,252 KB
testcase_02 AC 17 ms
8,176 KB
testcase_03 AC 17 ms
8,144 KB
testcase_04 AC 17 ms
8,244 KB
testcase_05 AC 17 ms
8,168 KB
testcase_06 AC 17 ms
7,876 KB
testcase_07 AC 17 ms
8,116 KB
testcase_08 AC 17 ms
8,068 KB
testcase_09 AC 18 ms
8,140 KB
testcase_10 AC 17 ms
8,064 KB
testcase_11 AC 17 ms
8,168 KB
testcase_12 AC 16 ms
8,112 KB
testcase_13 AC 17 ms
8,116 KB
testcase_14 AC 17 ms
8,224 KB
testcase_15 AC 17 ms
8,224 KB
testcase_16 AC 17 ms
8,252 KB
testcase_17 AC 17 ms
8,112 KB
testcase_18 AC 17 ms
8,104 KB
testcase_19 AC 17 ms
8,164 KB
testcase_20 AC 17 ms
8,236 KB
testcase_21 AC 18 ms
8,236 KB
testcase_22 AC 17 ms
8,060 KB
testcase_23 AC 17 ms
8,240 KB
testcase_24 AC 17 ms
8,108 KB
testcase_25 AC 17 ms
8,284 KB
testcase_26 AC 16 ms
8,156 KB
testcase_27 AC 16 ms
8,188 KB
testcase_28 AC 18 ms
8,168 KB
testcase_29 AC 17 ms
8,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())

x=N
import math 
L=int(math.sqrt(x))

FACT=dict()

for i in range(2,L+2):
    while x%i==0:
        FACT[i]=FACT.get(i,0)+1
        x=x//i

if x!=1:
    FACT[x]=FACT.get(x,0)+1

ANS=0
for f in FACT:
    ANS+=f*FACT[f]

print(ANS)
0