Even | Python3 code to find max ( X , Y ) / min ( X , Y ) after P turns ; 1 st test case ; 2 nd test case
def findValue ( X , Y , P ) : NEW_LINE INDENT if P % 2 == 0 : NEW_LINE INDENT return int ( max ( X , Y ) / min ( X , Y ) ) NEW_LINE DEDENT else : NEW_LINE INDENT return int ( max ( 2 * X , Y ) / min ( 2 * X , Y ) ) NEW_LINE DEDENT DEDENT X = 1 NEW_LINE Y = 2 NEW_LINE P = 1 NEW_LINE print ( findValue ( X , Y , P ) ) NEW_LINE X = 3 NEW_LINE Y = 7 NEW_LINE P = 2 NEW_LINE print ( ( findValue ( X , Y , P ) ) ) NEW_LINE