mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
The black formatter is no longer beta (#5960)
* The black formatter is no longer beta
* pre-commit autoupdate
* pre-commit autoupdate
* Remove project_euler/problem_145 which is killing our CI tests
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -81,14 +81,14 @@ def sum_of_divisors(n: int) -> int:
|
||||
temp += 1
|
||||
n = int(n / 2)
|
||||
if temp > 1:
|
||||
s *= (2 ** temp - 1) / (2 - 1)
|
||||
s *= (2**temp - 1) / (2 - 1)
|
||||
for i in range(3, int(math.sqrt(n)) + 1, 2):
|
||||
temp = 1
|
||||
while n % i == 0:
|
||||
temp += 1
|
||||
n = int(n / i)
|
||||
if temp > 1:
|
||||
s *= (i ** temp - 1) / (i - 1)
|
||||
s *= (i**temp - 1) / (i - 1)
|
||||
return int(s)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user