We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fbd350 commit e3fb530Copy full SHA for e3fb530
1 file changed
maths/decimal_to_fraction.py
@@ -48,8 +48,8 @@ def decimal_to_fraction(decimal: float | str) -> tuple[int, int]:
48
if remainder == 0:
49
break
50
dividend, divisor = divisor, remainder
51
- numerator, denominator = numerator / divisor, denominator / divisor
52
- return int(numerator), int(denominator)
+ numerator, denominator = numerator // divisor, denominator // divisor
+ return numerator, denominator
53
54
55
if __name__ == "__main__":
0 commit comments