Benny and Triangle
Practice
3.7 (44 votes)
Geometry
Binary search algorithm
Approved
Easy Medium
Problem
37% Success 3405 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code

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.

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
6 votes
Tags:
Basic ProgrammingOpenApprovedEasyMathamatics
Points:50
1 votes
Tags:
Segment TreesMedium-Hard
Points:20
55 votes
Tags:
Ad-HocApprovedBasic ProgrammingEasyOpen