結果

問題 No.1737 One to N
ユーザー Shirotsume
提出日時 2021-10-14 23:25:55
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 277 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 73,704 KB
最終ジャッジ日時 2024-11-25 10:56:11
合計ジャッジ時間 3,086 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

def prime_fact(N):
  res=defaultdict(int)
  for i in range(2,int(N**0.5)+2):
    if N%i==0:
      while N%i==0:
        res[i]+=1
        N//=i
  if N!=1:
    res[N]+=1
  return res

n = int(input())
d = prime_fact(n)
ans = 0
for x, y in d.items():
    ans += x * y
print(ans)
0