- Prepare
- Mathematics
- Fundamentals
- Minimum Height Triangle

# Minimum Height Triangle

# Minimum Height Triangle

- Prepare
- Mathematics
- Fundamentals
- Minimum Height Triangle

Given integers and , find the smallest integer , such that there exists a triangle of height , base , having an area of at least .

**Example**

The minimum height is . One example is a triangle formed at points (0, 0), (4, 0), (2, 3).

**Function Description**

Complete the *lowestTriangle* function in the editor below.

*lowestTriangle* has the following parameters:

*int b:*the base of the triangle*int a:*the minimum area of the triangle

**Returns**

*int:*the minimum integer height to form a triangle with an area of at least

**Input Format**

There are two space-separated integers and , on a single line.

**Constraints**

**Sample Input 0**

```
2 2
```

**Sample Output 0**

```
2
```

**Explanation 0**

The task is to find the smallest integer height of the triangle with base and area at least . It turns out, that there are triangles with height , base and area , for example a triangle with corners in the following points: :

It can be proved that there is no triangle with integer height smaller than , base and area at least .

**Sample Input 1**

```
17 100
```

**Sample Output 1**

```
12
```

**Explanation 1**

The task is to find the smallest integer height of the triangle with base and area at least . It turns out, that there are triangles with height , base and area , for example a triangle with corners in the following points: .

It can be proved that there is no triangle with integer height smaller than , base and area at least .