Back
Close
  • 189

Learning Opportunities

This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.

Statement

 Goal

For each of the given numbers A, find the smallest integer N, such that A^N < N! , where N! = 1 * 2 * ... * N
The numbers given can have up to 2 digits after decimal point.
Input
Line 1: An integer K for the number of inputs.
Line 2: K space separated numbers (can have a fractional part, e.g. 1.5): A_1, A_2, ... , A_K
Output
Line 1: K space separated integers: N_1, N_2, ... , N_K.
Constraints
1 ≤ K ≤ 100
1 < A_i < 10000
Example
Input
2
2 3
Output
4 7

A higher resolution is required to access the IDE