H. Don't Exceedtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou generate real numbers s1, s2, ..., sn as follows:   s0 = 0;  si = si - 1 + ti, where ti is a real number chosen independently uniformly at random between 0 and 1, inclusive. You are given real numbers x1, x2, ..., xn. You are interested in the probability that si ≤ xi is true for all i simultaneously.It can be shown that this can be represented as , where P and Q are coprime integers, and . Print the value of P·Q - 1 modulo 998244353.InputThe first line contains integer n (1 ≤ n ≤ 30).The next n lines contain real numbers x1, x2, ..., xn, given with at most six digits after the decimal point (0 < xi ≤ n).OutputPrint a single integer, the answer to the problem.ExamplesInput41.0023.0000004.0Output1Input10.50216Output342677322Input20.51.0Output623902721Input60.771.2345672.11.8902.99993.77Output859831967NoteIn the first example, the sought probability is 1 since the sum of i real numbers which don't exceed 1 doesn't exceed i.In the second example, the probability is x1 itself.In the third example, the sought probability is 3 / 8.
Input41.0023.0000004.0
Output1
['math', 'probabilities', '*3400']