Problem p03250 - Generation 2

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:

```
1 5 2
```

### 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

Certainly! Here is a test case generator for the problem statement you've provided:

```python
import random

def tcgen():
    """
    This function generates test cases for the allowance problem.
    """
    # Generating three random integers A, B, and C between 1 and 9 (inclusive).
    A = random.randint(1, 9)
    B = random.randint(1, 9)
    C = random.randint(1, 9)
    
    return A, B, C

# Example usage:
if __name__ == "__main__":
    for _ in range(10):  # Generate 10 test cases
        A, B, C = tcgen()
        print(f"{A} {B} {C}")
```

### Explanation:
- **A, B, C**: These variables represent the digits printed on the integer panels. Each is randomly chosen between 1 and 9 inclusive.
  
### Example Output:
Running the above code might produce outputs like:
```
5 3 1
8 2 4
6 7 7
1 9 3
3 3 2
2 8 5
7 4 6
9 1 1
5 6 8
4 2 9
```

Each line is a test case, representing the values of A, B, and C which you can use to test the game logic for determining the maximum possible allowance.

Extract Arguments

def extract_arguments(fh):
    A, B, C = map(int, fh.readline().strip().split())
    return A, B, C