#C7898. Fraction to Decimal Conversion
Fraction to Decimal Conversion
Fraction to Decimal Conversion
Given two integers as the numerator and the denominator, convert the fraction into its decimal representation. If the decimal part is repeating, enclose the repeating part in parentheses.
In particular, for a fraction \( \frac{numerator}{denominator} \), the decimal representation must be computed accurately. For example, \( \frac{2}{3} \) is represented as "0.(6)".
inputFormat
The input is given via stdin and consists of two integers separated by whitespace: the numerator and the denominator.
outputFormat
The output, printed to stdout, is the decimal representation of the fraction. If there is a repeating part in the decimal expansion, it should be enclosed in parentheses.
## sample1 2
0.5