Let's Construct! - ②
InterviewTime limit1sMemory limit512 MB
Given side lengths c of AB and b of AC, compute the ratio in which the internal angle bisector of angle A divides side BC.
- Level
Easy3 of 10
- Topics
- Math, Geometry, Implementation
- Solved
- No attempts yet
Problem
Jaewon, the king of geometric construction, came home after playing outside with great excitement, and since he had nothing to do, he decided to do some construction. Jaewon first drew triangle ABC on a piece of paper. Then he marked M as the intersection of the angle bisector of angle BAC and side BC.
Given the length of side AB and the length of side AC, write a program that computes the value of (length of segment BM) ÷ (length of segment CM).
Input
The first line gives the values of and in that order, separated by a single space. (The values of and are positive integers no greater than 1,000,000,000.)
Output
Print the answer required by the problem on the first line. An absolute or relative error of up to is allowed.