Practice on Toph

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

The Answer to Everything

By upobir · Limits 1s, 512 MB

What is the answer to the ultimate question of Life, the universe, and everything?

It is

You will be given n,k,mn, k, m, you have to output the answer to everything..

Input

There will be TT testcases.

In each testcase, the numbers n,k,mn, k, m will be given in one line, separeated by spaces.

1T10001 \leq T \leq 1000
1n1091 \leq n \leq 10^9
1k1091 \leq k \leq 10^9
1m1091 \leq m \leq 10^9

Output

For each testcase, output the answer in a line.

Sample

InputOutput
2
2 1 10
5 3 15
9
6

    Discussion

    Statistics


    0% Solution Ratio

    Submit

    Login to submit