Given two strings s and t, each representing a non negative rational number, return true if and only if they represent the same number. The strings may use parentheses to denote the repeating part of the rational number.
A rational number can be represented using up to three parts: <IntegerPart>, <NonRepeatingPart>, and <RepeatingPart>. The number will be expressed in one of the following three formats:
<IntegerPart>
For example,
<IntegerPart><.><NonRepeatingPart>
For example,
<IntegerPart><.><NonRepeatingPart><(><RepeatingPart><)>
For example,
The repeating portion of a decimal expansion is conventionally denoted within a pair of round brackets. For example:
Note: The same rational number may have multiple valid representations using different placements of the repeating block.
Constraints:
Each part consists only of digits.
The <IntegerPart> does not have leading zeros (except for the zero itself).
<IntegerPart>.length
<NonRepeatingPart>.length
<RepeatingPart>.length
Given two strings s and t, each representing a non negative rational number, return true if and only if they represent the same number. The strings may use parentheses to denote the repeating part of the rational number.
A rational number can be represented using up to three parts: <IntegerPart>, <NonRepeatingPart>, and <RepeatingPart>. The number will be expressed in one of the following three formats:
<IntegerPart>
For example,
<IntegerPart><.><NonRepeatingPart>
For example,
<IntegerPart><.><NonRepeatingPart><(><RepeatingPart><)>
For example,
The repeating portion of a decimal expansion is conventionally denoted within a pair of round brackets. For example:
Note: The same rational number may have multiple valid representations using different placements of the repeating block.
Constraints:
Each part consists only of digits.
The <IntegerPart> does not have leading zeros (except for the zero itself).
<IntegerPart>.length
<NonRepeatingPart>.length
<RepeatingPart>.length