結果

問題 No.888 約数の総和
ユーザー titiatitia
提出日時 2019-09-20 21:28:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 10,540 KB
実行使用メモリ 8,244 KB
最終ジャッジ日時 2023-10-12 17:52:21
合計ジャッジ時間 3,593 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,036 KB
testcase_01 AC 17 ms
8,080 KB
testcase_02 AC 17 ms
8,068 KB
testcase_03 AC 17 ms
8,176 KB
testcase_04 AC 16 ms
8,232 KB
testcase_05 AC 16 ms
8,144 KB
testcase_06 AC 17 ms
8,136 KB
testcase_07 AC 16 ms
8,096 KB
testcase_08 AC 17 ms
8,148 KB
testcase_09 AC 16 ms
8,092 KB
testcase_10 AC 16 ms
8,100 KB
testcase_11 AC 16 ms
8,052 KB
testcase_12 AC 17 ms
8,168 KB
testcase_13 AC 16 ms
8,220 KB
testcase_14 AC 16 ms
8,080 KB
testcase_15 AC 16 ms
8,080 KB
testcase_16 AC 17 ms
8,156 KB
testcase_17 AC 17 ms
8,128 KB
testcase_18 AC 127 ms
8,184 KB
testcase_19 AC 97 ms
8,052 KB
testcase_20 AC 73 ms
8,140 KB
testcase_21 AC 119 ms
8,176 KB
testcase_22 AC 136 ms
8,056 KB
testcase_23 AC 21 ms
8,172 KB
testcase_24 AC 63 ms
8,176 KB
testcase_25 AC 69 ms
8,172 KB
testcase_26 AC 80 ms
8,148 KB
testcase_27 AC 119 ms
8,064 KB
testcase_28 AC 123 ms
8,220 KB
testcase_29 AC 103 ms
8,056 KB
testcase_30 AC 130 ms
8,244 KB
testcase_31 AC 115 ms
8,080 KB
testcase_32 AC 123 ms
8,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x=int(input())


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=1

for f in FACT:
    sc=0
    for i in range(FACT[f]+1):
        sc+=f**i
    ANS*=sc

print(ANS)
0