
    Design a fraud detection function for the bank's transaction monitoring system that identifies potentially suspicious transactions by checking if their transaction ID number is one less than twice its reverse. For example, if a transaction ID is 36, its reverse would be 63, and the function should verify if 36 is one less than twice 63 (which is 126). This pattern could indicate automated fraudulent activity in the transaction system.
    

    
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):
    """
    Design a fraud detection function for the bank's transaction monitoring system that identifies potentially suspicious transactions by checking if their transaction ID number is one less than twice its reverse. For example, if a transaction ID is 36, its reverse would be 63, and the function should verify if 36 is one less than twice 63 (which is 126). This pattern could indicate automated fraudulent activity in the transaction system.
    

    """
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):
    """
    Design a fraud detection function for the bank's transaction monitoring system that identifies potentially suspicious transactions by checking if their transaction ID number is one less than twice its reverse. For example, if a transaction ID is 36, its reverse would be 63, and the function should verify if 36 is one less than twice 63 (which is 126). This pattern could indicate automated fraudulent activity in the transaction system.
    

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