Showing:
Handle Score
@Ibrahim Nash 5761
@akhayrutdinov 5111
@mb1973 4989
@Quandray 4944
@saiujwal13083 4506
@sanjay05 3762
@marius_valentin_dragoi 3516
@sushant_a 3459
@verma_ji 3341
@KshamaGupta 3318
The Cycle Game
Basic Accuracy: 0.0% Submissions: 0 Points: 1

Given a number X and another number . There are a total  N cycles ,  and alternatively we perform operation on each number . In each cycle , we multiply the number by 2 . Starting with X .

Suppose after all the N cycles, the number X has become W and  number Y has become . Find the integer division of the maximum number among and Z by the minimum number among W and.

Example 1:

Input: x = 1, y = 2, n = 1
Output: 2
Explanation:  the initial numbers are (X = 1,
Y = 2). There is only one turn. In this turn X
is multiplied by 2. Hence, we get (X = 2,
Y = 2)
Therefore W = 2, and Z = 2.
max (W , Z) / min (W , Z) =  2 / 2  = 1.
Hence the first output is 1.


Example 2:

Input: x = 3, y = 2, n = 3
Output: 3
Explanation: the initial numbers are (X = 3,
Y = 2). There three turns. In the first cycle
X is multiplied by 2.So, we get (X = 6, Y = 2).
In the second cycle Y (Y = 2) multiplies his
number by 2. Hence, we get  ( X = 6,  Y = 4 ).
In the third cycle  X ( X = 6) is multiplied by
2. So, we get (X = 12, Y = 4) . As N = 3 ,
completed with 3 cyles, therefore W = 12 and
Z = 4. max (W ,  Z) / min (W , Z) = 12 / 4 = 3.
Hence the second output is 3.


You don't need to read or print anyhting. Your task is to complete the function find_division() which takes X, Y and N as input parameter and returns the integer division of max(w, z) / min(w, z)

Expected Time Complexity: O(1)
Expected Space Complexity: O(1)

Constraints:
1 <= X, Y <= 108
1 <= N <= 109