#K71112. Taco Score Calculator

    ID: 33460 Type: Default 1000ms 256MiB

Taco Score Calculator

Taco Score Calculator

In this problem, you are given a player's current score S and a points adjustment P. The new score is calculated based on the parity of S. Specifically, if S is even then the new score is calculated by the formula $$new_score = S + 2 \times P$$, whereas if S is odd the new score becomes $$new_score = S + P$$. Your task is to compute the new score for each of the given test cases.

Note: The input consists of multiple test cases. Process each test case and output the result on a new line.

inputFormat

The first line of input contains a single integer T, which represents the number of test cases. Each of the following T lines contains two space-separated integers S and P, where S is the current score and P is the points to be added (or subtracted).

outputFormat

For each test case, output a single integer on a new line representing the calculated new score.## sample

3
10 5
15 -6
20 0
20

9 20

</p>