# Problem Description
This appears to be a geometric problem involving rectangle folding. The function takes two numbers representing the dimensions of a rectangle and needs to calculate a value X based on a specific folding pattern. The folding creates a triangular shape, and we need to calculate the area or some measurement related to the resulting shape.

# Visual Facts
1. Input consists of two numbers (a, b) in Example 2
2. Example 1 shows specific values (4, 3)
3. The initial shape is always a rectangle
4. A diagonal dashed line is drawn in each rectangle
5. A curved arrow indicates folding direction
6. The result shows a transformed shape with:
   - A vertical section (marked as X)
   - A right triangle formation
7. In Example 1:
   - Initial rectangle: 4 × 3
   - Final X value = 3
8. In Example 2:
   - Initial rectangle: a × b
   - Final X value = a(b-a)

# Visual Patterns
1. Folding Pattern:
   - The rectangle is folded along a diagonal line
   - The fold creates a right triangle configuration
   - The fold always goes from top-right to bottom-left

2. Mathematical Rules:
   - When dimensions are (4,3):
     * X = 3
   - In general case (a,b):
     * X = a(b-a) if a < b


# Solution
from typing import List

def solution(input_values: List[int]) -> int:       
    """
    Calculates X according to the specified rules.  

    Args:
        input_values: A list containing two integers

    Returns:
        The calculated value of X as an integer     
    """
    # Extract the side lengths
    a, b = input_values
    
    # Identify the longer and shorter side
    longer, shorter = max(a, b), min(a, b)
    
    # Calculate the area
    area = (longer - shorter) * shorter
    
    return area


# Test Script
def test():
    test_cases = [
        {"input": [3, 4], "expected": 3},
        {"input": [5, 10], "expected": 25}, 
        {"input": [7, 8], "expected": 7},
        {"input": [1, 1], "expected": 0},
        {"input": [100, 200], "expected": 10000},
        {"input": [5, 5], "expected": 0},
        {"input": [5, 50], "expected": 225},
        {"input": [15, 53], "expected": 570},
        {"input": [15, 60], "expected": 675},
        {"input": [100, 100], "expected": 0},
    ]

    for i, test_case in enumerate(test_cases, 1):
        try:
            output = solution(test_case["input"])
        except Exception as e:
            error_message = (
                f"An exception occurred while running the test case:\n"
                f"`input_values`: {test_case['input']}\n\n"
                f"Exception: '{str(e)}'"
            )
            assert False, error_message

        if output != test_case["expected"]:
            error_message = (
                f"The following Test Case failed:\n"
                f"`input_values`: {test_case['input']}\n\n"
                f"Actual Output: {output}\n"
                f"Expected Output: {test_case['expected']}"
            )
            assert False, error_message

test()