# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

You have got a **6** sided dice. In a single roll, it may show any integers from **1** to **6**. You are going to roll it exactly **N** times. In each roll, the integer shown on the top face of the dice will be added to your points.

You have to find out, what is the maximum and minimum number of points you can achieve after throwing the dice for exactly N times.

The first line contains an integer **T (1 ≤ T ≤ 20)**, denoting the number of test cases.

Each of the next **T** lines will contain an integer **N (0 ≤ N ≤ 20)**.

For each test case, print two integers separated by a space. These two integers represent the maximum and the minimum points you can earn by rolling the dice exactly N times.

Input | Output |
---|---|

1 2 | 12 2 |

98% Solution Ratio

vector94Earliest,

vector94Fastest, 0.0s

vector94Lightest, 0 B

sarthakmannaShortest, 55B

Login to submit