#P5671. 「SWTR-2」Triangles
「SWTR-2」Triangles
Description
He encountered two puzzles:
-
In a plane, the line segment intersects the line at point . Given , find a point on the line such that is an isosceles triangle, and compute the measure of . (If the answer is not an integer, keep decimal place.)
-
Given a right triangle with two sides , find the length of the third side (keep decimal places).

Write a program to compute the answers to the problems.
Input Format
One line with three positive integers: .
Output Format
Output two lines. The first line is the answer to the first question, and the second line is the answer to the second question.
If there are multiple solutions, separate them with spaces and output them in increasing order.
60 1 1
30 60
1.41421
Hint
Sample Explanation
Problem :
-
When point is to the left of point , the formed is an equilateral triangle, so .
-
When point is to the right of point , in the formed , is the vertex angle, so .
Problem :
The third side is the hypotenuse, with length .
Constraints and Notes
.
Problem Setter's Hint
There are countless methods, but reading carefully comes first. Multiple solutions are not considered, and a wrong answer brings two lines of tears.
Translated by ChatGPT 5
京公网安备 11011102002149号