結果
問題 |
No.1737 One to N
|
ユーザー |
|
提出日時 | 2021-10-14 23:27:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 43 ms / 2,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 194 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 55,784 KB |
最終ジャッジ日時 | 2024-11-25 10:56:14 |
合計ジャッジ時間 | 2,164 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
def prime_fact(N): from collections import defaultdict 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)