Orig Description
Problem A: Lunch
Problem
One day, Kawabayashi-kun is trying to have his lunch at the school cafeteria.
There are three types of daily lunch menus: A, B, and C, at the cafeteria.
Kawabayashi-kun is a big eater, and he wants to eat all three types of daily lunch menus, one each.
However, he wants to minimize the sum of calories he consumes, so he decides to give up one of the lunch menus and have two different ones.
Given the calories of A, B, and C lunch menus for a certain day, please find out which lunch menu he will give up.
Input
The input is given in the following format.
$a$ $b$ $c$
Three integers $a$, $b$, and $c$ are given separated by a space. They represent the calories of A, B, and C lunch menus for a certain day, respectively.
Constraints
The input satisfies the following conditions.
$1 \leq a, b, c \leq 5000 $
$a \neq b, b \neq c, c \neq a$
Output
Print the name of the lunch menu that Kawabayashi-kun gives up on a single line.
If he gives up A, print "A".
If he gives up B, print "B".
If he gives up C, print "C".
Sample Input 1
1000 900 850
Sample Output 1
A
Sample Input 2
1000 800 1200
Sample Output 2
C
Extracted Specification
Canonicalized Input Description:
Three integers \(a\), \(b\), and \(c\) separated by a space. Each integer is between 1 and 5000, and all three integers are distinct.
### Example Input:
```
1000 900 850
```
### Function Signature:
Write a function f(inputs) that takes in the input.
```python
def f(inputs: List[Tuple[int, int, int]]):
'''
inputs: a list of tuples, each containing three distinct integers
'''
```
Test Case Generator
Sure! For the given problem, we need to create a test case generator that will produce valid test cases according to the problem constraints. Here is the Python function to generate such test cases:
```python
import random
def tcgen():
# Generate distinct values for a, b, and c
a = random.randint(1, 5000)
b = a
c = a
while b == a:
b = random.randint(1, 5000)
while c == a or c == b:
c = random.randint(1, 5000)
return a, b, c
# Example usage
for _ in range(5):
a, b, c = tcgen()
print(f"{a} {b} {c}")
```
This function generates three distinct integers \( a \), \( b \), and \( c \) within the given constraints. Here's a breakdown of how it works:
1. It first initializes \( a \) with a random integer between 1 and 5000.
2. It then initializes \( b \) and \( c \) to \( a \) to ensure that the initial values are the same.
3. It uses a while loop to ensure that \( b \) and \( c \) are distinct from \( a \) and each other.
4. Finally, it returns the three distinct values \( a \), \( b \), and \( c \).
You can run this function multiple times to generate different test cases. Each time, the function will produce a valid set of inputs according to the problem constraints.
Extract Arguments
def extract_arguments(fh):
a, b, c = map(int, fh.readline().strip().split())
return a, b, c