Ax+Bsin(x)=C II
Time limit2sMemory limit512 MB
Find the unique positive x with Ax + B sin(x) = C, given 0 < B <= A, and print it to nine decimals.
- Level
Medium4 of 10
- Topics
- Binary search, Math
- Solved
- No attempts yet
Problem
You are given integers , , and . Write a program that finds the solution of the equation .
The constraints give , so the left side grows as grows. The equation therefore has exactly one solution, and that solution is positive because .
Input
The first line contains the integers , , and , separated by spaces. (, )
Output
Print on the first line, rounded at the tenth digit after the decimal point so that exactly nine digits follow the decimal point. Keep a trailing zero instead of dropping it, so nine digits always appear after the decimal point.