
    Write a function to validate student ID numbers in a learning management system by checking if each ID is one less than twice its reverse digits. For example, if a student ID is 36, its reverse is 63, and the ID would be valid if 36 is one less than twice 63 (which is 126 - 1 = 125, so 36 would be invalid).
    

    
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 validate student ID numbers in a learning management system by checking if each ID is one less than twice its reverse digits. For example, if a student ID is 36, its reverse is 63, and the ID would be valid if 36 is one less than twice 63 (which is 126 - 1 = 125, so 36 would be invalid).
    

    """
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 validate student ID numbers in a learning management system by checking if each ID is one less than twice its reverse digits. For example, if a student ID is 36, its reverse is 63, and the ID would be valid if 36 is one less than twice 63 (which is 126 - 1 = 125, so 36 would be invalid).
    

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