HackerRank - Minimum Height Triangle
· ☕ 2 min read · ✍️ devoalda
Introduction Given integers b and a, find the smallest integer h, such that there exists a triangle of height h, base b, having an area of at least a.
Example Input Output 1 2 3 4 # Input: 2 2 # Output: 2 {: file="Input and Output” }
Explanation:
The task is to find the height of the triangle having base b = 2 and area a = 2.