Binbin and Balls
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Binbin gets a special material ball. As everyone knows, Binbin is a curious girl, so she decides to study the hardness of the ball. She finds a building with n storeys. Every time she chooses a floor f arbitrarily and throws a ball down from the f floor. The ball may be intact, but it may also be broken. If the ball is broken, it cannot be used again. Unfortunately, Binbin only has two balls, she wants to find the largest x that if she throws the ball down from the x floor, the ball will not be broken. Also, she wants to know in the worst case, how many times she needs to throw at least to find the value of x.
Note: It is certain that if a ball will be broken after dropped from x-th floor, it will also be broken after dropped from y-th floor where y>x.

输入描述:

The first line contains an integer T (1<=T<=1e5)– the number of test cases.
In the next T lines, each line contains an integer n (1<=n<=1e18) – the number of storeys of the building.

输出描述:

Output T lines. Each line contains an integer – the minimum number of times Binbin needs to throw in the worst case.

示例1

输入

复制
2
1
5

输出

复制
1
3