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

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.

Vagesh Verma | 98 |

UrGuru | 98 |

chaolinyu | 84 |

prernaus24 | 83 |

devendrachoudhary5485 | 74 |

abducodes | 624 |

harshtyagi36 | 298 |

highway_to_hell | 252 |

rajeswarii | 248 |

arpit_anshuman | 240 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4567 |

Login to report an issue on this page.