mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 18:49:26 +08:00
Add solution method for project_euler/problem_37 (#2998)
* add solution method * fix formatting
This commit is contained in:
@ -87,5 +87,12 @@ def compute_truncated_primes(count: int = 11) -> list[int]:
|
|||||||
return list_truncated_primes
|
return list_truncated_primes
|
||||||
|
|
||||||
|
|
||||||
|
def solution() -> int:
|
||||||
|
"""
|
||||||
|
Returns the sum of truncated primes
|
||||||
|
"""
|
||||||
|
return sum(compute_truncated_primes(11))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
print(f"{sum(compute_truncated_primes(11)) = }")
|
print(f"{sum(compute_truncated_primes(11)) = }")
|
||||||
|
Reference in New Issue
Block a user