
    Write a function to detect potentially fraudulent transactions by checking if a transaction amount is one less than twice its reverse digits (e.g., $2341 and $1432). This pattern has been identified as a common technique used in financial fraud schemes where criminals manipulate transaction amounts to avoid detection while maintaining a mathematical relationship between original and reversed values.
    

    
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 detect potentially fraudulent transactions by checking if a transaction amount is one less than twice its reverse digits (e.g., $2341 and $1432). This pattern has been identified as a common technique used in financial fraud schemes where criminals manipulate transaction amounts to avoid detection while maintaining a mathematical relationship between original and reversed values.
    

    """
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 detect potentially fraudulent transactions by checking if a transaction amount is one less than twice its reverse digits (e.g., $2341 and $1432). This pattern has been identified as a common technique used in financial fraud schemes where criminals manipulate transaction amounts to avoid detection while maintaining a mathematical relationship between original and reversed values.
    

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