Skip to content

Commit 982c62f

Browse files
committed
Fix
1 parent 8c92cd9 commit 982c62f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

project_euler/problem_002/sol4.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def solution(n: int = 4000000) -> int:
6161
if n <= 0:
6262
raise ValueError("Parameter n must be greater than or equal to one.")
6363
getcontext().prec = 100
64-
phi = (Decimal(5) ** Decimal(0.5) + 1) / Decimal(2)
64+
phi = (Decimal(5) ** Decimal("0.5") + 1) / Decimal(2)
6565

6666
index = (math.floor(math.log(n * (phi + 2), phi) - 1) // 3) * 3 + 2
6767
num = Decimal(round(phi ** Decimal(index + 1))) / (phi + 2)

0 commit comments

Comments
 (0)