mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
[Project Euler] Fix code style for multiple problems (#3094)
* Fix code style for Project Euler problems: - 13, 17, 21 - Default args - Type hints - File path * Fix code style for multiple problems * Made suggested changes
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"""
|
||||
Problem 46: https://projecteuler.net/problem=46
|
||||
|
||||
It was proposed by Christian Goldbach that every odd composite number can be
|
||||
written as the sum of a prime and twice a square.
|
||||
|
||||
@@ -84,5 +86,10 @@ def compute_nums(n: int) -> list[int]:
|
||||
return list_nums
|
||||
|
||||
|
||||
def solution() -> int:
|
||||
"""Return the solution to the problem"""
|
||||
return compute_nums(1)[0]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(f"{compute_nums(1) = }")
|
||||
print(f"{solution() = }")
|
||||
|
||||
Reference in New Issue
Block a user