
    In a school's early intervention system, write a function that identifies high-priority students by checking if their ID number is one less than twice its reverse - a pattern indicating immediate need for support services. For example, if a student's ID is 36, its reverse would be 63, and the student would be flagged if 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):
    """
    In a school's early intervention system, write a function that identifies high-priority students by checking if their ID number is one less than twice its reverse - a pattern indicating immediate need for support services. For example, if a student's ID is 36, its reverse would be 63, and the student would be flagged if 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):
    """
    In a school's early intervention system, write a function that identifies high-priority students by checking if their ID number is one less than twice its reverse - a pattern indicating immediate need for support services. For example, if a student's ID is 36, its reverse would be 63, and the student would be flagged if 36 = (2 × 63) - 1.
    

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