It is known that in regular dice, the sum of opposite faces is
.
A regular dice is rolled and you are given the value showing on the top face. Determine the value on the bottom face.
Input Format
- The first line will contain - the number of test cases. Then the test cases follow.
- The first and only of each test case contains a single integer - the value on the top face.
Output Format
For each test case, output the value on the bottom face.
Constraints
Sample Input 1
3
3
1
6
Sample Output 1
4
6
1
Explanation
Test case-1: The value on the top face is . Therefore, the value on the bottom face is because .
Test case-2: The value on the top face is . Therefore, the value on the bottom face is because .
Test case-3: The value on the top face is . Therefore, the value on the bottom face is because .
No comments:
Post a Comment