Benny and Triangle

3.7

44 votes
Geometry, Binary search algorithm, Approved, Easy-Medium
Problem

View Russian Translation

One day Benny decides to miss lessons. But as she is a very good pig she will do her homework anyway. She doesn't know anything about the content of this lessons. Your task is to help her.

The problem is following: you are given a right triangle with coordinates of vertices (0, 0), (0, a), (b, 0) and integer p. You may choose any value val and draw a vertical line x = val. After that let area(val) be the area of the part of triangle at the right side of this line. Your task is to find such minimal val that area(val) is not more than p% of the area of the given triangle.

Input

The first and the only one line contains three integers a, b and p.

Output

Output in a single line answer to the problem with two signs after decimal point.

It is guaranteed that the answer+10-6 and answer-10-6 would produce the same rounded answer.

Constraints

  • 1 ≤ a, b ≤ 107
  • 1 ≤ p < 100
  • 1 ≤ a, b ≤ 103 holds for test cases worth 20% of the problem's score.
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?