Problem p03738 - Generation 1

Orig Description

Score : 200 points
Problem StatementYou are given two positive integers A and B. Compare the magnitudes of these numbers.
Constraints
1 ≤ A, B ≤ 10^{100}
Neither A nor B begins with a 0.
InputInput is given from Standard Input in the following format:
A
B
OutputPrint GREATER if A>B, LESS if A24, print GREATER.
Sample Input 2850
3777
Sample Output 2LESS
Sample Input 39720246
22516266
Sample Output 3LESS
Sample Input 4123456789012345678901234567890
234567890123456789012345678901
Sample Output 4LESS

Extracted Specification

An integer A (1 ≤ A < 10^101) without leading zeros.
An integer B (1 ≤ B < 10^101) without leading zeros.

### Example Input:

```
36
24
```

### Function Signature:
Write a function f(inputs) that takes in the input.
```python
def f(inputs: List[Tuple[str, str]]):
    ''' 
    inputs: a list of tuples, where each tuple contains two strings representing integers
    '''
```

Test Case Generator

Certainly! Here is a test case generator for the problem where you are given two positive integers \(A\) and \(B\) and you need to compare their magnitudes:

```python
import random

def generate_large_number():
    # Generates a random large number with digits between 1 and 100
    length = random.randint(1, 100)
    # Ensure the number does not start with zero
    number = str(random.randint(1, 9))
    number += ''.join(random.choices('0123456789', k=length-1))
    return number

def tcgen():
    A = generate_large_number()
    B = generate_large_number()
    
    return A, B

# Example usage
A, B = tcgen()
print(A)
print(B)
```

This function will generate two random large numbers \(A\) and \(B\) with lengths between 1 and 100 digits, ensuring they do not start with a zero. 

Example output when running the generator:

```
573829374828392938475
283948293847293847
```

You can use the generated values to test the comparison logic in your competitive programming solution.

Extract Arguments

def extract_arguments(fh):
    A = fh.readline().strip()
    B = fh.readline().strip()
    return A, B