#P5671. Angle and Hypotenuse Puzzle

    ID: 18899 Type: Default 1000ms 256MiB

Angle and Hypotenuse Puzzle

Angle and Hypotenuse Puzzle

In this problem, you are given two puzzles.

1. In a plane, a line segment DE and a line FG intersect at point O. Given the angle (\angle DOF = x^\circ), you are required to select a point P on the line FG such that triangle (DOP) is isosceles with (DO = OP). Derive the measure of (\angle D) in the triangle. (Note: (\angle D = \frac{180-x}{2}); if the answer is not an integer, output it with one decimal place.)

2. You are given a right triangle with two sides (the legs) of lengths (m) and (n). Compute the length of the hypotenuse using the Pythagorean theorem, i.e. (\sqrt{m^2+n^2}), and output the result with five decimal places.

This problem requires you to write a program that outputs the answers for the two puzzles on a single line, the first being (\angle D) and the second being the hypotenuse.

inputFormat

The input consists of a single line containing three numbers separated by spaces:
x m n
where:
- (x) is the measure (in degrees) of (\angle DOF),
- (m) and (n) are the lengths of the two legs of a right triangle.

outputFormat

Output a single line with two values separated by a space:
- The first value is (\angle D) (formatted to 1 decimal place), computed as (\frac{180-x}{2}),
- The second value is the length of the hypotenuse (formatted to 5 decimal places), computed as (\sqrt{m^2+n^2}).

sample

60 3 4
60.0 5.00000