
    Write a function to determine if an event's recommendation score follows the special pairing rule, where the score is one less than twice its reverse digits, to match users with similar interests. For example, if an event has a recommendation score of 36, it would satisfy this rule since 36 is one less than twice its reverse (63), making it 36 = (2 × 63) - 1.
    

    
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 to determine if an event's recommendation score follows the special pairing rule, where the score is one less than twice its reverse digits, to match users with similar interests. For example, if an event has a recommendation score of 36, it would satisfy this rule since 36 is one less than twice its reverse (63), making it 36 = (2 × 63) - 1.
    

    """
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 to determine if an event's recommendation score follows the special pairing rule, where the score is one less than twice its reverse digits, to match users with similar interests. For example, if an event has a recommendation score of 36, it would satisfy this rule since 36 is one less than twice its reverse (63), making it 36 = (2 × 63) - 1.
    

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