
    Write a function to determine if a patient's identifier number indicates high readmission risk by checking if it is one less than twice its reverse value, a pattern identified in the hospital's risk assessment model. For example, if a patient's ID is 36, its reverse is 63, and the system would check if 36 is one less than twice 63 (126-1=125).
    

    
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 a patient's identifier number indicates high readmission risk by checking if it is one less than twice its reverse value, a pattern identified in the hospital's risk assessment model. For example, if a patient's ID is 36, its reverse is 63, and the system would check if 36 is one less than twice 63 (126-1=125).
    

    """
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 a patient's identifier number indicates high readmission risk by checking if it is one less than twice its reverse value, a pattern identified in the hospital's risk assessment model. For example, if a patient's ID is 36, its reverse is 63, and the system would check if 36 is one less than twice 63 (126-1=125).
    

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