
    Write a function to identify at-risk students by analyzing their attendance ID numbers, where a student requires immediate intervention if their ID number is exactly one less than twice its reverse number. For example, if a student's ID is 36, its reverse is 63, and the student would be flagged if 36 is one less than twice 63 (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):
    """
    Write a function to identify at-risk students by analyzing their attendance ID numbers, where a student requires immediate intervention if their ID number is exactly one less than twice its reverse number. For example, if a student's ID is 36, its reverse is 63, and the student would be flagged if 36 is one less than twice 63 (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):
    """
    Write a function to identify at-risk students by analyzing their attendance ID numbers, where a student requires immediate intervention if their ID number is exactly one less than twice its reverse number. For example, if a student's ID is 36, its reverse is 63, and the student would be flagged if 36 is one less than twice 63 (36 = 2*63 - 1).
    

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