Skip to content

Commit 4fe4739

Browse files
wenhonggstokhos
authored andcommitted
Add solution method for project_euler/problem_37 (TheAlgorithms#2998)
* add solution method * fix formatting
1 parent 77bab35 commit 4fe4739

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: project_euler/problem_37/sol1.py

+7
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,12 @@ def compute_truncated_primes(count: int = 11) -> list[int]:
8787
return list_truncated_primes
8888

8989

90+
def solution() -> int:
91+
"""
92+
Returns the sum of truncated primes
93+
"""
94+
return sum(compute_truncated_primes(11))
95+
96+
9097
if __name__ == "__main__":
9198
print(f"{sum(compute_truncated_primes(11)) = }")

0 commit comments

Comments
 (0)