#P2399. Decimal to Improper Fraction Conversion
Decimal to Improper Fraction Conversion
Decimal to Improper Fraction Conversion
Given a decimal number, convert it into an improper fraction in the form \(\frac{numerator}{denominator}\).
The decimal number can be of two types: an ordinary decimal or a repeating decimal. In the case of a repeating decimal, the repeating part is enclosed in parentheses. For example, 0.(3) represents 0.333\ldots
inputFormat
The input consists of a single line containing a decimal number. It may be an ordinary decimal or a repeating decimal. For a repeating decimal, the repeating part will be given in parentheses.
outputFormat
Output the equivalent improper fraction in the form numerator/denominator.
sample
0.75
3/4