Number of hours after which the second person moves ahead of the first person if they travel at a given speed | Function to return the number of hours for the second person to move ahead ; Time taken to equalize ; Time taken to move ahead ; Driver code
def findHours ( a , b , k ) : NEW_LINE INDENT if ( a >= b ) : NEW_LINE INDENT return - 1 NEW_LINE DEDENT time = k // ( b - a ) NEW_LINE time = time + 1 NEW_LINE return time NEW_LINE DEDENT a = 4 NEW_LINE b = 5 NEW_LINE k = 1 NEW_LINE print ( findHours ( a , b , k ) ) NEW_LINE