Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added solution for Project Euler problem 72 #3122

Merged
merged 7 commits into from
Oct 16, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update type annotations and 0-padding of directory name. Reference: #…
  • Loading branch information
fpringle committed Oct 15, 2020
commit b1d2b34dafc9a387c32509d48c82c73af0032c75
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""
Project Euler Problem 72: https://projecteuler.net/problem=72

Consider the fraction, n/d, where n and d are positive integers. If n<d and HCF(n,d)=1,
it is called a reduced proper fraction.

Expand All @@ -15,7 +17,7 @@
"""


def solution(limit: int = 1000000):
def solution(limit: int = 1000000) -> int:
"""
Return the number of reduced proper fractions with denominator less than limit.
>>> solution(8)
Expand All @@ -40,4 +42,4 @@ def solution(limit: int = 1000000):


if __name__ == "__main__":
print(solution())
print(f"{solution() = }")