Time Limit: 0.5 second(s) | Memory Limit: 32 MB |
Dr. Mob has just discovered a Deathly Bacteria. He named it RC-01. RC-01 has a very strange reproduction system. RC-01 lives exactly x days. Now RC-01 produces exactly p new deadly Bacteria where x = b^{p} (where b, p are integers). More generally, x is a perfect p^{th} power. Given the lifetime x of a mother RC-01 you are to determine the maximum number of new RC-01 which can be produced by the mother RC-01.
Input starts with an integer T (≤ 50), denoting the number of test cases.
Each case starts with a line containing an integer x. You can assume that x will have magnitude at least 2 and be within the range of a 32 bit signed integer.
For each case, print the case number and the largest integer p such that x is a perfect p^{th} power.
Sample Input |
Output for Sample Input |
3 17 1073741824 25 |
Case 1: 1 Case 2: 30 Case 3: 2 |
Developed and Maintained by
JANE ALAM JAN |
Copyright © 2012
LightOJ, Jane Alam Jan |