Function to return lcm of two numbers
def lcm ( a , b ) : NEW_LINE INDENT return ( a * b ) // ( math . gcd ( a , b ) ) NEW_LINE DEDENT def dfs ( src , adj , visited ) : NEW_LINE INDENT visited [ src ] = True NEW_LINE count = 1 NEW_LINE if adj [ src ] != 0 : NEW_LINE INDENT for i in range ( len ( adj [ src ] ) ) : NEW_LINE INDENT if ( not visited [ adj [ src ] [ i ] ] ) : NEW_LINE INDENT count += dfs ( adj [ src ] [ i ] , adj , visited ) NEW_LINE DEDENT DEDENT DEDENT return count NEW_LINE DEDENT def findMinTime ( arr , P , n ) : NEW_LINE