Question: [Python] Blocks on Blocks If you know the game tetris , you may be familiar with the following figures: These figures contains rows of squares.

[Python] Blocks on Blocks

If you know the game tetris, you may be familiar with the following figures:

[Python] Blocks on Blocks If you know the game tetris, you may

These figures contains rows of squares. In each row, squares are consecutive. Adjacent rows share at least one side of a square, so the following figures are not allowed:

be familiar with the following figures: These figures contains rows of squares.

Given the number of squares, count the number of figures. Since the number may be huge, the answer is the number of figures modulo 10000. That is, the output will always be between 0 and 9999.

Input

The first line of input contains a single integer In each row, squares are consecutive. Adjacent rows share at least one , the number of test cases. Each test case contains a single integer side of a square, so the following figures are not allowed: Given, the number of squares.

Output

For each test case, print the case number followed by the answer for that case. Use the format in the sample output below.

the number of squares, count the number of figures. Since the number

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!