------
## 最终结论
```python
def convert_to_list(num):
    return [int(digit) for digit in str(num)]

def find_swap_pair(digits):
    max_idx = -1
    max_digit = -1
    swap_from = -1
    swap_to = -1
    
    for i in range(len(digits) - 1, -1, -1):
        if digits[i] > max_digit:
            max_digit = digits[i]
            max_idx = i
        elif digits[i] < max_digit:
            swap_from = i
            swap_to = max_idx
            
    return (swap_from, swap_to)

def swap_digits(digits, swap_pair):
    swap_from, swap_to = swap_pair
    if swap_from != -1 and swap_to != -1:
        digits[swap_from], digits[swap_to] = digits[swap_to], digits[swap_from]
    return digits

def convert_to_integer(digits):
    return int(''.join(map(str, digits)))

def maximum_swap(num):
    digits = convert_to_list(num)
    swap_pair = find_swap_pair(digits)
    new_digits = swap_digits(digits, swap_pair)
    return convert_to_integer(new_digits)

# Example usage:
num1 = 2736
print(maximum_swap(num1))  # Output: 7236

num2 = 9973
print(maximum_swap(num2))  # Output: 9973
```