
    Write a function to determine if a traffic signal cycle duration, when reversed numerically, satisfies the condition where the original duration is one less than twice its reverse - a key pattern found to optimize traffic flow at intersections. For example, if a signal duration is 912 seconds, check if 912 is one less than twice the value of 219.
    

    
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 traffic signal cycle duration, when reversed numerically, satisfies the condition where the original duration is one less than twice its reverse - a key pattern found to optimize traffic flow at intersections. For example, if a signal duration is 912 seconds, check if 912 is one less than twice the value of 219.
    

    """
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 traffic signal cycle duration, when reversed numerically, satisfies the condition where the original duration is one less than twice its reverse - a key pattern found to optimize traffic flow at intersections. For example, if a signal duration is 912 seconds, check if 912 is one less than twice the value of 219.
    

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