AtCoder Beginner Contest 243
G
Sqrt
AtCoder
⌀ 2032
原题
← Ex→
翻译中…

Problem Statement

翻译中…

We have a sequence of length $1$: $A=(X)$. Let us perform the following operation on this sequence $10^{100}$ times.

翻译中…

Operation: Let $Y$ be the element at the end of $A$. Choose an integer between $1$ and $\sqrt{Y}$ (inclusive), and append it to the end of $A$.

翻译中…

How many sequences are there that can result from $10^{100}$ operations?

翻译中…

You will be given $T$ test cases to solve.

翻译中…

It can be proved that the answer is less than $2^{63}$ under the Constraints.

翻译中…

Constraints

翻译中…
  • $1 \leq T \leq 20$
  • $1 \leq X \leq 9\times 10^{18}$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

T
\rm case_1
\vdots
\rm case_T

翻译中…

Each case is in the following format:

翻译中…

X

翻译中…

Output

翻译中…

Print $T$ lines. The $i$-th line should contain the answer for $\rm case_i$.

翻译中…

样例

Input #1
4
16
1
123456789012
1000000000000000000
Output #1
5
1
4555793983
23561347048791096
In the first case, the following five sequences can result from the operations. - $(16,4,2,1,1,1,\ldots)$ - $(16,4,1,1,1,1,\ldots)$ - $(16,3,1,1,1,1,\ldots)$ - $(16,2,1,1,1,1,\ldots)$ - $(16,1,1,1,1,1,\ldots)$
题目信息
题号
abc243_g
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。