
    Write a function that determines if a delivery route identifier is one less than twice its reverse number, which would indicate an optimal bidirectional pairing for return trip efficiency. For example, if route 123 pairs with route 321, the system can evaluate if these routes form an efficient round-trip pattern according to the given mathematical relationship.
    

    
def rev(num):
    rev_num = 0
    while num > 0:
        rev_num = rev_num * 10 + num % 10
        num = num // 10
    return rev_num

def check(n):
    """
    Write a function that determines if a delivery route identifier is one less than twice its reverse number, which would indicate an optimal bidirectional pairing for return trip efficiency. For example, if route 123 pairs with route 321, the system can evaluate if these routes form an efficient round-trip pattern according to the given mathematical relationship.
    

    """
def rev(num):
    rev_num = 0
    while num > 0:
        rev_num = rev_num * 10 + num % 10
        num = num // 10
    return rev_num

def check(n):
    """
    Write a function that determines if a delivery route identifier is one less than twice its reverse number, which would indicate an optimal bidirectional pairing for return trip efficiency. For example, if route 123 pairs with route 321, the system can evaluate if these routes form an efficient round-trip pattern according to the given mathematical relationship.
    

    """
    return 2 * rev(n) == n + 1