Return the solution to the problem
(n: int = 2)
| 58 | |
| 59 | |
| 60 | def solution(n: int = 2) -> int: |
| 61 | """ |
| 62 | Return the solution to the problem |
| 63 | """ |
| 64 | result = 1.0 |
| 65 | for fraction in fraction_list(n): |
| 66 | frac = Fraction(fraction) |
| 67 | result *= frac.denominator / frac.numerator |
| 68 | return int(result) |
| 69 | |
| 70 | |
| 71 | if __name__ == "__main__": |