SP8044 IMMERSED - Fantastic Discovery

Description

A fantastic discovery is about to happen in the biology field, and you are part of the team making the research. The research is about measuring the cells growth in an environment oxygenless and in presence of a toxic substance. The team came to a courious hypothesis, the analyzed data tells them that: the growth, the number of days and the toxicity; are related by this formula: **P** = **N\*N $ ^{cN} $** $ _{;} $ where **P** is the growth measured in thousands of cells. **N** is the elapsed number of days. and **c** is the constant that relates to the toxicity level of the experiment. Your biology partners need to takeout some tissues from the cells when these cells reach a specific growth. They require you to write a program that tells them the exact time when this will happen, given a toxicity level and the growth required.

Input Format

The first line is **T** (1 T T test cases follow. Each test case is a line with 2 integers(**P c**) separated by a space. **P** (1 P **c** (1 c

Output Format

For each test case you have to output the expected time in decimal format.