Setting

Solve the equation

\(p \cdot e^{-x} + q \cdot \sin(x) + r \cdot \cos(x) + s \cdot \tan(x) + t \cdot x^2 + u = 0\)

where \(0 \leq 1\).

Input

Input consists of multiple test cases and is terminated by an EOF. Each test case consists of 6 integers in a single line: \(p, q, r, s, t, u\) (where \(0 \leq p,r \leq 20\) and \(-20 \leq q, s, t \leq 0\)). There will be a maximum of 2100 text cases.

Output

For each test case, there should be a line containing the value of \(x\), correct up to 4 decimal places, or the string No Solution, whicever is applicable.

Sample Input

0 0 0 0 -2 1
1 0 0 0 -1 2
1 -1 1 -1 -1 1

Sample Output

0.7071
No solution
0.7554

This is challenge 10341 of the ACM International Collegiate Programming Contest. Test input is provided by uDebug.

Upload Solution

Please log in to submit your solution.

Statistics

Difficulty (3 votes)
Average test runtime 0.29
Points (changes over time) 10
Tried by 2 users
Solved by 2 users

Global ranking

# Name Runtime Points worth
1 AlexanderP 0.19 13
2 Thore 0.38 7