Under construction

Still being built. Things may change

Ax+Bsin(x)=C II

Time limit2sMemory limit512 MB

Summary
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 AA, BB, and CC. Write a program that finds the solution xx of the equation Ax+Bsin⁡(x)=CAx + B\sin(x) = C.

The constraints give 0<B≤A0 < B \le A, so the left side grows as xx grows. The equation therefore has exactly one solution, and that solution is positive because C>0C > 0.

Input

The first line contains the integers AA, BB, and CC, separated by spaces. (0<B≤A≤100,0000 < B \le A \le 100{,}000, 0<C≤100,0000 < C \le 100{,}000)

Output

Print xx 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.

Examples2

  1. Example 1

    Input
    1 1 20
    
    Expected output
    19.441786710
    
  2. Example 2

    Input
    100000 1 1
    
    Expected output
    0.000010000