Editorial for Triangle Area
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Note that the triangle given is guaranteed to be a right angle triangle, which means the base and height of the triangle is simply the 2 shorter sides of the triangle. The longer side would therefore be the hypotenuse.
In case you do not know, the area of a triangle is , where is the base length and is the height of the triangle.
Time Complexity:
Comments