Orig Description
Score : 100 points
Problem StatementYou have decided to give an allowance to your child depending on the outcome of the game that he will play now.
The game is played as follows:
There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a + printed on it.
The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.)
Then, the amount of the allowance will be equal to the resulting value of the formula.
Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
Constraints
All values in input are integers.
1 \leq A, B, C \leq 9
InputInput is given from Standard Input in the following format:
A B C
OutputPrint the maximum possible amount of the allowance.
Sample Input 11 5 2
Sample Output 153
The amount of the allowance will be 53 when the panels are arranged as 52+1, and this is the maximum possible amount.
Sample Input 29 9 9
Sample Output 2108
Sample Input 36 6 7
Sample Output 382
Extracted Specification
An integer A (1 ≤ A ≤ 9).
An integer B (1 ≤ B ≤ 9).
An integer C (1 ≤ C ≤ 9).
### Example Input:
```
5 2 1
```
### Function Signature:
Write a function f(A, B, C) that takes in the input.
def f(A: int, B: int, C: int):
'''
A: an integer
B: an integer
C: an integer
'''
Test Case Generator
Sure, I can help you write a test case generator for this problem. Below is the Python code to generate random test cases for the given problem statement:
```python
import random
def tcgen():
# Since A, B, and C are integers between 1 and 9 inclusive
A = random.randint(1, 9)
B = random.randint(1, 9)
C = random.randint(1, 9)
return A, B, C
# Generate a test case
A, B, C = tcgen()
print(A, B, C)
```
### Explanation:
1. **Random Values Generation**:
- Each panel (A, B, and C) is assigned a random integer between 1 and 9, inclusive, as per the constraints of the problem.
2. **Return Values**:
- The generated values are returned as a tuple `(A, B, C)`.
3. **Print Statement**:
- The generated test case is printed to verify the output.
### Usage:
- You can call the `tcgen()` function to generate random test cases for the problem.
- The test case values can be used in your solution to test its correctness and performance.
### Example:
When you run the generator, it might produce an output like:
```
7 3 5
```
This output means that the integers on the panels are 7, 3, and 5, respectively. You can then use these values to test your solution for finding the maximum possible allowance.
Extract Arguments
def extract_arguments(fh):
A, B, C = map(int, fh.readline().strip().split())
return A, B, C
# if __name__ == "__main__":
# input_path = sys.argv[1]
# with open(input_path, 'r') as fh:
# A, B, C = extract_arguments(fh)
# f(A, B, C)