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
To create a test case generator for the "Kannon-Do" problem, we need to consider the constraints and the format of the input/output. The input consists of multiple datasets, where each dataset is a single integer \( n \) (1 ≤ \( n \) ≤ 30), and the end of the input is indicated by a single zero line. We need to generate random datasets within the given constraints and ensure the format is as expected.
Here's a Python function to generate random test cases for the "Kannon-Do" problem:
```python
import random
def tcgen():
# Number of datasets (1 to 30)
num_datasets = random.randint(1, 30)
# Generate each dataset
datasets = [random.randint(1, 30) for _ in range(num_datasets)]
# Append the terminating zero
datasets.append(0)
return datasets
# Example usage
if __name__ == "__main__":
test_case = tcgen()
for number in test_case:
print(number)
```
### Explanation:
1. **num_datasets**: This variable decides how many datasets to generate, constrained by the problem to be between 1 and 30.
2. **datasets**: This list comprehension generates random integers between 1 and 30 for each dataset.
3. **Append 0**: The terminating zero is added to the list of datasets.
4. **Returning datasets**: The function returns the list of datasets.
### Example Output:
Running this function might produce output like:
```
7
15
3
28
0
```
This represents three datasets with values 7, 15, and 3, and the terminating zero.
This test case generator ensures that the generated test cases adhere to the constraints and format specified in the problem statement. You can run the `tcgen()` function to generate various test cases for the "Kannon-Do" problem.
Extract Arguments
def extract_arguments(fh):
datasets = []
while True:
n = int(fh.readline().strip())
if n == 0:
break
datasets.append((n,))
return datasets
# if __name__ == "__main__":
# input_path = sys.argv[1]
# with open(input_path, 'r') as fh:
# inputs = extract_arguments(fh)
# f(inputs)