You have $N$
bricks two dimensional bricks of the dimension $1 \times 2$
. The bricks are rotatable i.e. you can turn the brick of dimension $1 \times 2$
into $2 \times 1$
. Now, you have to determine how many different rectangular shapes can you create by arranging the bricks. Two rectangular shapes are different if their dimensions are different. There should be no space left in the rectangular shapes that you create with the bricks i.e they must be filled with bricks.
Note: Dimension $a \times b$
and $b \times a$
considered same.
In the first line, there will be an integer $T$
, the number of testcases.
In the next $T$
lines, there will be an integer $N$
, indicating the number of bricks you will receive.
For Subtask 1: (30 points)
$1 \le T \le 1000$
$1 \le N \le 10000$
For Subtask 2: (30 points)
$1 \le T \le 100$
$1 \le N \le 10^{12}$
For Subtask 3: (40points)
$1 \le T \le 100$
$1 \le N \le 10^{14}$
For each $N$
, print the number of ways you can arrange the bricks.
Input | Output |
---|---|
4 1 2 3 4 | 1 2 2 2 |
Possible Dimension for 1 bricks are: 1 x 2 Possible Dimension for 2 bricks are: 2 x 2, 4 x 1 Possible Dimension for 3 bricks are: 1 x 6, 2 x 3 Possible DImension for 4 bricks are: 4 x 2, 1 x 8 |