Given three positive integers X, Y and P. Here P denotes the number of turns. Whenever the turn is odd X is multiplied by 2 and in every even turn Y is multiplied by 2.Find the value of Max(X, Y) ÷ Min(X, Y) after the completion of P turns.
After 1st turn,
After first turn,
After Second turn,
You don't need to read input or print anything.Your task is to complete the function findValue() which takes 3 integers X,Y,P as input parameters and returns the value of Max(X,Y)/Min(X,Y) after P turns.
Expected Time Complexity:O(1) Expected Auxillary Space:O(1)