|Input file:||input.txt||Time limit:||1 sec|
|Output file:||output.txt||Memory limit:||256 Mb|
An expression for a function is composed of single-digit numbers, variable x, signs + and *, and zero or one calls to function sin. More formally:
Function f(x) has period p if f(x+p) = f(x) for all x.
Your program must, given an expression with no more than one call to sin, determine the minimal period of a function.
The input file contains a single string — expression.
Output file must contain single a floating point number — period with relative error not greater than 10−6. If a function is constant or aperiodic, output number 0.
Expression length is between 1 and 25 characters. There are no spaces in expression.
|No.||Input file (
||Output file (|