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 8fe31f7 commit 3480740Copy full SHA for 3480740
project_euler/problem_060/sol1.py
@@ -217,6 +217,11 @@ def search(chain: tuple) -> tuple[int, ...] | None:
217
Recursive backtracking search to find a valid set of primes.
218
A threshold is used to ensure we don't exceed the smallest sum.
219
Returns the valid set if found, else None.
220
+
221
+ >>> search((3,))
222
+ (3, 7, 109, 673)
223
+ >>> search((7,))
224
+ (7, 109, 673, 3)
225
"""
226
if len(chain) == target_size:
227
return chain
0 commit comments