Orig Description
Fishing Competition
Brothers Hiroshi and Kenjiro came to Lake Inawashiro to go fishing. They decided to compete against each other by assigning points to the fish they caught and adding up the total points.
One iwana is worth a points.
One yamame is worth b points.
Every 10 iwana caught is worth an additional c points.
Every 20 yamame caught is worth an additional d points.
Write a program to determine who won the competition, or if it is a tie, based on the number of fish caught by each person.
Input
The input is given in the following format:
h1 h2
k1 k2
a b c d
The first line contains the number of iwana h1 (0 ≤ h1 ≤ 100) and yamame h2 (0 ≤ h2 ≤ 100) caught by Hiroshi. The second line contains the number of iwana k1 (0 ≤ k1 ≤ 100) and yamame k2 (0 ≤ k2 ≤ 100) caught by Kenjiro. The third line contains the points assigned to one iwana a (1 ≤ a ≤ 100), one yamame b (1 ≤ b ≤ 100), the additional points awarded for every 10 iwana caught c (0 ≤ c ≤ 100), and the additional points awarded for every 20 yamame caught d (0 ≤ d ≤ 100).
Output
Output hiroshi if Hiroshi wins, kenjiro if Kenjiro wins, or even if it is a tie.
Sample Input 1
5 1
3 1
1 2 5 5
Sample Output 1
hiroshi
Sample Input 2
5 1
4 2
1 2 5 5
Sample Output 2
kenjiro
Sample Input 3
0 20
10 0
1 1 10 0
Sample Output 3
even
Extracted Specification
An integer h1 (0 ≤ h1 ≤ 100) and an integer h2 (0 ≤ h2 ≤ 100).
An integer k1 (0 ≤ k1 ≤ 100) and an integer k2 (0 ≤ k2 ≤ 100).
Four integers a (1 ≤ a ≤ 100), b (1 ≤ b ≤ 100), c (0 ≤ c ≤ 100), and d (0 ≤ d ≤ 100).
### Example Input:
```
5 1
3 1
1 2 5 5
```
### Function Signature:
Write a function f(h1, h2, k1, k2, a, b, c, d) that takes in the input.
def f(h1: int, h2: int, k1: int, k2: int, a: int, b: int, c: int, d: int):
'''
h1: an integer
h2: an integer
k1: an integer
k2: an integer
a: an integer
b: an integer
c: an integer
d: an integer
'''
Test Case Generator
Sure, here is the test case generator for the given problem statement "Fishing Competition":
```python
import random
def tcgen():
# Generate random counts of iwana and yamame for Hiroshi and Kenjiro
h1 = random.randint(0, 100) # Hiroshi's iwana
h2 = random.randint(0, 100) # Hiroshi's yamame
k1 = random.randint(0, 100) # Kenjiro's iwana
k2 = random.randint(0, 100) # Kenjiro's yamame
# Generate random point values and bonuses
a = random.randint(1, 100) # Points for one iwana
b = random.randint(1, 100) # Points for one yamame
c = random.randint(0, 100) # Additional points for every 10 iwana
d = random.randint(0, 100) # Additional points for every 20 yamame
return (h1, h2), (k1, k2), (a, b, c, d)
# Generate a test case and print it
test_case = tcgen()
print("Test Case:")
print(test_case[0][0], test_case[0][1])
print(test_case[1][0], test_case[1][1])
print(test_case[2][0], test_case[2][1], test_case[2][2], test_case[2][3])
```
### Explanation
This test case generator function `tcgen` generates random values for the number of fish caught by Hiroshi and Kenjiro as well as the points and bonus points for the fish. Here is how the values are generated:
- `h1`, `h2`: Number of iwana and yamame caught by Hiroshi, respectively. These values are randomly chosen between 0 and 100.
- `k1`, `k2`: Number of iwana and yamame caught by Kenjiro, respectively. These values are randomly chosen between 0 and 100.
- `a`, `b`: Points for one iwana and one yamame, respectively. These values are randomly chosen between 1 and 100.
- `c`, `d`: Additional points awarded for every 10 iwana and 20 yamame, respectively. These values are randomly chosen between 0 and 100.
The generated test case includes all the random values as described and prints them in the required input format.
You can use this function to generate multiple random test cases for the "Fishing Competition" problem.
Extract Arguments
def extract_arguments(fh):
h1, h2 = map(int, fh.readline().strip().split())
k1, k2 = map(int, fh.readline().strip().split())
a, b, c, d = map(int, fh.readline().strip().split())
return (h1, h2), (k1, k2), (a, b, c, d)