atcoder#ABC243G. [ABC243G] Sqrt
[ABC243G] Sqrt
Score : points
Problem Statement
We have a sequence of length : . Let us perform the following operation on this sequence times.
Operation: Let be the element at the end of . Choose an integer between and (inclusive), and append it to the end of .
How many sequences are there that can result from operations?
You will be given test cases to solve.
It can be proved that the answer is less than under the Constraints.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Each case is in the following format:
Output
Print lines. The -th line should contain the answer for .
4
16
1
123456789012
1000000000000000000
5
1
4555793983
23561347048791096
In the first case, the following five sequences can result from the operations.