Problem p00312 - Generation 1

Orig Description

Frog's Straight Path Home
A frog is trying to get back to its nest. The nest is D centimeters away from the frog, and the frog moves straight towards the nest. The frog can only perform two actions:
 Big jump (move forward L centimeters)
 Small jump (move forward 1 centimeter)
The frog aims to land exactly on the nest without jumping over it.
Write a program to determine the minimum number of jumps the frog needs to make to reach its nest.
Input
The input is given in the following format:
D L
The input is given in one line, where D (1 ≤ D ≤ 10000) is the distance to the nest, and L (2 ≤ L ≤ 10000) is the distance the frog can jump with a big jump.
Output
Output the minimum number of jumps the frog needs to make in one line.
Sample Input 1
10 5
Sample Output 1
2
Sample Input 2
7 4
Sample Output 2
4

Extracted Specification

An integer D (1 ≤ D ≤ 10000), representing some quantity.
An integer L (2 ≤ L ≤ 10000), representing some other quantity.

### Example Input:

```
10 5
```

### Function Signature:
Write a function f(D, L) that takes in the input. 
def f(D: int, L: int): 
    ''' 
    D: an integer 
    L: an integer
    '''

Test Case Generator

Certainly! Here's a test case generator for the "Frog's Straight Path Home" problem:

```python
import random

def tcgen():
    D = random.randint(1, 10000)
    L = random.randint(2, 10000)
    return D, L

# Example of generating a test case
for _ in range(5):
    print(tcgen())
```

This script generates random test cases for the given problem. It will produce pairs of integers \( D \) and \( L \) within the specified ranges.

Here are some example outputs from running the generator:

```
(523, 7463)
(9614, 4321)
(10000, 2)
(1, 10000)
(3457, 7890)
```

You can use these pairs \( (D, L) \) as inputs for your program to test its correctness and performance.

Extract Arguments

def extract_arguments(fh):
    D, L = map(int, fh.readline().strip().split())
    return D, L