diff --git a/project_euler/problem_034/sol1.py b/project_euler/problem_034/sol1.py index 8d8432dbbb7a..4c3cfe6ccb5c 100644 --- a/project_euler/problem_034/sol1.py +++ b/project_euler/problem_034/sol1.py @@ -30,7 +30,9 @@ def solution() -> int: >>> solution() 40730 """ - limit = 7 * factorial(9) + 1 + # The upper bound is 1,499,999, as shown in this proof: + # https://rosettacode.org/wiki/Talk:Factorions + limit = 1_499_999 return sum(i for i in range(3, limit) if sum_of_digit_factorial(i) == i)