結果
問題 | No.1737 One to N |
ユーザー |
![]() |
提出日時 | 2021-11-12 21:26:23 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 37 ms / 2,000 ms |
コード長 | 478 bytes |
コンパイル時間 | 222 ms |
コンパイル使用メモリ | 82,220 KB |
実行使用メモリ | 53,512 KB |
最終ジャッジ日時 | 2024-11-25 12:01:22 |
合計ジャッジ時間 | 2,051 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
N = int(input())if N == 1:print(0)exit()def factorization(n):if n == 1:return [[1, 1]]temp = nans = []for i in range(2, int(n**0.5+1.01)):if temp % i == 0:ct = 0while temp % i == 0:temp //= ict += 1ans.append([i, ct])if temp != 1:ans.append([temp, 1])return ansd = factorization(N)ans = 0for p, c in d:ans += p*cprint(ans)