Orig Description
Soroban
At the request of a friend who has just started learning soroban, you are asked to create a program that displays the arrangement of soroban beads. Create a program that takes a number as input and outputs the arrangement of soroban beads. However, assume that the number of digits to be displayed on the soroban is 5, and that the configuration of the beads for numbers 0 to 9 is represented by '*' (half-width asterisk), ' ' (half-width space), and '=' (half-width equal sign) as follows:
Input
Multiple test cases are given. Each test case consists of a single line containing a number (integer) of up to 5 digits.
The number of test cases does not exceed 1024.
Output
For each test case, output the arrangement of soroban beads. Put a blank line between the test cases.
Sample Input
2006
1111
Output for the Sample Input
****
*
=====
* *
****
* ***
*****
*****
*****
=====
****
*
*****
*****
*****
Extracted Specification
Canonicalized Input Description:
Multiple test cases are given.
Each test case consists of a single line containing a number (integer) of up to 5 digits.
The number of test cases does not exceed 1024.
### Example Input:
```
2006
1111
```
### Function Signature:
Write a function f(inputs) that takes in the input.
def f(inputs: List[str]):
'''
inputs: a list of strings
'''
Test Case Generator
Certainly! To generate test cases for the "Soroban" problem, we need to create random numbers with up to 5 digits and multiple test cases. Below is the test case generator for the given problem statement:
```python
import random
def tcgen():
# Number of test cases
T = random.randint(1, 1024)
test_cases = []
for _ in range(T):
num = random.randint(0, 99999)
test_cases.append(num)
return test_cases
# Generating and printing test cases
test_cases = tcgen()
for test_case in test_cases:
print(test_case)
```
### Explanation of the Test Case Generator:
1. **Number of Test Cases (T)**:
- Randomly generate the number of test cases, ensuring it is between 1 and 1024.
2. **Generating Numbers**:
- For each test case, generate a random number between 0 and 99999 to ensure it is up to 5 digits.
3. **Output**:
- The test cases are stored in a list and printed one by one.
When the generated test cases are used as input to the program, each number will be formatted according to the soroban bead arrangement rules specified in the problem statement. The output will need to be formatted so that there is a blank line between each test case's output.
Extract Arguments
def extract_arguments(fh):
inputs = []
for line in fh:
number = line.strip()
if number:
inputs.append(int(number))
return inputs
# if __name__ == "__main__":
# input_path = sys.argv[1]
# with open(input_path, 'r') as fh:
# inputs = extract_arguments(fh)
# f(inputs)