Problem p00168 - Generation 2

Orig Description

Kannon-Do
There is a Kannon-Do (a temple dedicated to the goddess of mercy, Kannon) on the mountain behind Ichiro's house. There are 30 steps from the base to the Kannon-Do, and Ichiro goes to the Kannon-Do to play almost every day. Ichiro can climb up to three steps with one step. While playing, Ichiro noticed that there are many ways to climb the steps (various numbers of steps to skip).
Therefore, he decided to climb up the steps in 10 different ways every day and try all the ways. However, as a mathematician, you should know that this will take Ichiro's entire life.
To convince Ichiro that his plan is impossible, write a program that takes the number of steps n as input and outputs the number of years it would take for Ichiro to climb all the steps in 10 different ways per day. Assume that a year has 365 days. If at least one day is necessary, it is counted as one year. If there are 365 days, it is one year, and if there are 366 days, it is two years.
Input
The input is a sequence of multiple datasets. The end of the input is indicated by a single zero line.
For each dataset, a single integer n (1 ≤ n ≤ 30) representing the number of steps is given on a line.
There are no more than 30 datasets.
Output
For each dataset, output the number of years (an integer) required for Ichiro to climb all the steps in all 10 ways on a single line.
Sample Input
1
10
20
25
0
Output for the Sample Input
1
1
34
701

Extracted Specification

An integer n (1 ≤ n ≤ 30), representing some quantity.
The input is a sequence of multiple datasets, ending with a single zero line.
There are no more than 30 datasets.

### Example Input:

```
1
10
20
25
0
```

### Function Signature:
Write a function f(inputs) that takes in the input.
def f(inputs: List[int]):
    '''
    inputs: a list of integers
    '''

Test Case Generator

Certainly! I'll write a test case generator for the "Kannon-Do" problem. The generator will produce multiple datasets, each with a single integer \( n \) representing the number of steps, and will include a terminating zero line to mark the end of the input.

Here's the test case generator:

```python
import random

def tcgen():
    datasets = []
    num_datasets = random.randint(1, 30)  # Generate between 1 and 30 datasets
    
    for _ in range(num_datasets):
        n = random.randint(1, 30)  # Each n is between 1 and 30
        datasets.append(n)
    
    datasets.append(0)  # Append the terminating zero
    
    return datasets

# Testing the generator
if __name__ == "__main__":
    test_case = tcgen()
    for n in test_case:
        print(n)
```

### Explanation:

- **num_datasets**: This variable determines how many datasets will be generated, and it will be a random number between 1 and 30.
- **n**: This variable represents the number of steps, and for each dataset, it will be a random integer between 1 and 30.
- **datasets**: This list will store all the generated datasets, and at the end, a terminating zero will be added to mark the end of the input.

### Sample Output:
Running the generator might produce an output like this:
```
5
27
16
9
3
22
14
30
1
0
```

This will generate a sequence of random step numbers followed by a zero to indicate the end of the input. Each time you run the generator, it will produce different sequences of step numbers.

### Usage in a Competitive Programming Context:
Use this generator to create diverse test cases to ensure your solution handles various edge cases and typical scenarios for the problem statement.

Extract Arguments

def extract_arguments(fh):
    inputs = []
    while True:
        n = int(fh.readline().strip())
        if n == 0:
            break
        inputs.append(n)
    return inputs