#P1888. Sine of the Smaller Acute Angle in a Pythagorean Triple
Sine of the Smaller Acute Angle in a Pythagorean Triple
Sine of the Smaller Acute Angle in a Pythagorean Triple
Given three distinct positive integers a, b, and c that form a Pythagorean triple (i.e., they satisfy the relation \(a^2+b^2=c^2\)), compute the sine of the smaller acute angle of the right triangle. In a right triangle, the hypotenuse is the largest side, and the two legs are the remaining sides. The smaller acute angle is opposite the smaller leg. Therefore, the sine of the smaller acute angle is given by:
\(\sin\theta = \frac{\min(\text{leg}_1,\,\text{leg}_2)}{\text{hypotenuse}}\)
Output the result as a reduced fraction.
inputFormat
The input consists of three space-separated integers \(a\), \(b\), and \(c\) (with \(a \neq b \neq c\)) which represent the sides of a right triangle and satisfy \(a^2+b^2=c^2\). They can be given in any order.
outputFormat
Output the sine of the smaller acute angle as a fraction in its simplest form, i.e., in the form \(p/q\) where \(p\) and \(q\) are coprime.
sample
3 4 5
3/5