There is a right triangle ABC with ∠ABC=90°. Given the lengths of the three sides, AB ,…
- User
There is a right triangle ABC with ∠ABC=90°.
Given the lengths of the three sides, |AB|,|BC| and |CA|, find the area of the right triangle ABC.
It is guaranteed that the area of the triangle ABC is an integer.
Constraints
- 1 \leq |AB|,|BC|,|CA| \leq 100
- All values in input are integers.
- The area of the triangle ABC is an integer.
Input
Input is given from Standard Input in the following format:
|AB| |BC| |CA|
Output
Print the area of the triangle ABC.
Examples
Input
3 4 5
Output
6
Input
5 12 13
Output
30
Input
45 28 53
Output
630
Assistant
We are asked: "There is a right triangle ABC with ∠ABC=90°. Given the lengths of the three sides, |AB|, |BC| and |CA|, find the area of the right triangle ABC." It is guaranteed that the area is an integer.
Constraints: 1 ≤ sides ≤ 100, all integers, area integer.
We are given the three sides, but note that angle B is right angle. So sides are: AB, BC are legs? Since ∠ABC = 90°, meaning vertex B is the right angle. So sides: AB and BC are the two legs, and CA is the hypotenuse. So the area = (1/2) * (AB) * (BC). Since the input provides three sides, we must verify that indeed triangle is right-angled at B, but it is given that it is. So we can just compute (AB * BC) // 2. But wait: The input might give sides in any order? The problem statement: "Given the lengths of the three sides, |AB|,|BC| and |CA|, find the area." It explicitly labels the sides as |AB|, |BC|, |CA|. So the order is AB, BC, CA. So yes, AB and BC are legs. So area = (AB * BC) / 2. Since area guaranteed integer, we can compute AB * BC // 2.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.