mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 18:38:39 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
2590a893f8
commit
2a37bbf8c5
@ -1,9 +1,9 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from math import ceil, sqrt
|
from math import ceil, sqrt
|
||||||
|
|
||||||
def primeproduct( num : int) -> list[int]:
|
|
||||||
|
|
||||||
'''
|
def primeproduct(num: int) -> list[int]:
|
||||||
|
"""
|
||||||
>>> primeproduct(868)
|
>>> primeproduct(868)
|
||||||
[2, 2, 7, 31]
|
[2, 2, 7, 31]
|
||||||
>>> primeproduct(9039423423423743)
|
>>> primeproduct(9039423423423743)
|
||||||
@ -13,7 +13,7 @@ def primeproduct( num : int) -> list[int]:
|
|||||||
ValueError: invalid literal for int() with base 10: '0.02'
|
ValueError: invalid literal for int() with base 10: '0.02'
|
||||||
>>> primeproduct(-2342)
|
>>> primeproduct(-2342)
|
||||||
[]
|
[]
|
||||||
'''
|
"""
|
||||||
|
|
||||||
if num <= 1:
|
if num <= 1:
|
||||||
return []
|
return []
|
||||||
@ -48,7 +48,6 @@ def primeproduct( num : int) -> list[int]:
|
|||||||
flag = 1
|
flag = 1
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
if not flag and num > 1:
|
if not flag and num > 1:
|
||||||
prime_factors.append(num)
|
prime_factors.append(num)
|
||||||
num = 1
|
num = 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user