Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

A witch has imprisoned Bob in the **1 ^{st}** room of the Central Witchland Hotel. The hotel is weird. All the rooms are numbered linearly, i.e.

Luckily, Bob has found

The first line of the input will contain an integer, **T**, number of test cases to follow. Each of the next **T** lines will continue **two** integer numbers, **n** and **k**, as discussed before.

1 ≤ **T** ≤ 10^{5}

1 ≤ **n** ≤ 10^{6}

2 ≤ **K** ≤ 10

Print **T** lines, answer to each test case. Your solution will be considered correct if the absolute difference between your answer and the judge’s answer is less than **10 ^{-6}**.

Input | Output |
---|---|

1 1 3 | 1.50000000 |

*You have to go to any room numbered greater than n, not in n.*

43% Solution Ratio

tanimahossainEarliest,

solaimanopeFastest, 0.1s

solaimanopeLightest, 1.7 MB

Shaad221BShortest, 755B

Login to submit