#C6925. Maximize Grid Sum After Turns

    ID: 50739 Type: Default 1000ms 256MiB

Maximize Grid Sum After Turns

Maximize Grid Sum After Turns

You are given a grid with dimensions \(n \times m\) and a number \(k\) of turns. In each turn, the total sum of the values in the grid increases optimally. It turns out that the maximum possible sum of values in the grid after \(k\) turns is exactly \(k\), regardless of the dimensions \(n\) and \(m\). Your task is to compute this maximum sum.

Note: Although the grid dimensions are provided, they do not affect the final answer. The answer for each test case is simply the integer \(k\).

For example, if the input is:

1
2 2 3

then the output should be:

3

inputFormat

The input begins with an integer \(T\) representing the number of test cases. Each test case is described in a single line containing three integers \(n\), \(m\), and \(k\) separated by spaces. Here, \(n\) and \(m\) represent the grid dimensions, and \(k\) represents the number of turns.

Example:

3
2 2 3
3 3 9
1 5 4

outputFormat

For each test case, output the maximum possible sum after \(k\) turns on a new line. Since the maximum sum is \(k\) for each test case, your output will be each \(k\) separated by a newline.

Example:

3
9
4
## sample
1
2 2 3
3

</p>