ZOJ Problem Set - 3595
We have a real value x and two infinite sequences A and B. We know that B0 = 1. And for each i larger than zero, we know that:
For every given A0, define:
Now given A0 and list of xi which has n elements, calculate the geometric mean of all F(x), thus:
The input contains several test cases.
For each test case, the first line contains a real value A0(0 < A0 < 10000) and an integer n(0 < n < 10000), then the second line contains n real values xi(0 ≤ xi ≤ 30).
For each test case, output a real number as the description required. The relative or absolute error of the answer should not exceed 1e-6.
55.55 1 0.0 12.34 1 1.0
Author: FAN, Yuzhe
Contest: The 12th Zhejiang University Programming Contest