Even-Odd turn game
Submissions: 1376   Accuracy:

19.68%

  Difficulty: Basic   Marks: 1

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. The task is to find the value of max(X, Y) ÷ min(X, Y) after the complete P turns.

Input:

The first line of the input contains a single integer T, denoting the number of test cases. Then T test case follows, a single line of the input containing three integers X,Y and P.


Output:

For each test case, print the value of max(X, Y) ÷ min(X, Y) after the complete P turns .
Constraints:

1<=T<=100

1<=X<=Y<=P<=1000
Example:

Input:

2

1 2 1

3 7 2

Output:

1

2

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Sahil Chhabra
Author: Sahil_Chhabra


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.