We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cea941 commit beda6fcCopy full SHA for beda6fc
project_euler/problem_034/sol1.py
@@ -30,7 +30,9 @@ def solution() -> int:
30
>>> solution()
31
40730
32
"""
33
- limit = 7 * factorial(9) + 1
+ # The upper bound is 1,499,999, as shown in this proof:
34
+ # https://math.stackexchange.com/a/112383/89462
35
+ limit = 1_499_999
36
return sum(i for i in range(3, limit) if sum_of_digit_factorial(i) == i)
37
38
0 commit comments