#K59222. Organism Growth Simulation

    ID: 30817 Type: Default 1000ms 256MiB

Organism Growth Simulation

Organism Growth Simulation

An organism grows following a unique pattern. On day 0, its size is 1. For days 1 through 5, its size is given by \(3^D\) where \(D\) is the day number. For days greater than 5, the organism's size is calculated as follows:

First, compute the size at day 5, which is \(3^5\). Then, for every two days beyond day 5, the size multiplies by 5. Formally, if \(D > 5\), let \(g = \lfloor (D-5)/2 \rfloor\). The size at day \(D\) is:

\[ \text{size}(D) = 3^5 \times 5^g \]

Your task is to process several test cases, each test case providing a day \(D\), and output the size of the organism at the end of that day.

inputFormat

The first line contains an integer \(T\) (\(T \ge 1\)), the number of test cases. Each of the next \(T\) lines contains a non-negative integer \(D\), representing the day number.

outputFormat

For each test case, output a single line containing the size of the organism at the end of day \(D\).

## sample
4
0
3
6
7
1

27 243 1215

</p>