which is at most .
Find three distinct non-negative integers that do not exceed and satisfy the following equation:
Here, denotes the bitwise OR operator and denotes the bitwise AND operator.
It can be shown that a solution always exists for inputs satisfying the given constraints. If there are multiple solutions, you may print any of them.
Input Format
- The first line contains an integer , the number of test cases. The description of test cases follows.
- Each test case consists of a single line containing one integer, .
Output Format
- For each test case, print on a new line three different space-separated integers .
- Your output will be considered correct only if are distinct non-negative integers not exceeding that satisfy the equation given in the problem statement.
- If there are multiple solutions, you may print any of them.
Constraints
- must be pairwise distinct
Sample Input 1
4
3
2
13
100000000
Sample Output 1
1 2 3
2 3 4
6 9 13
23570468 129811858 80835401
Explanation
Test case : and hence is one valid solution when . However there are several other solutions.
For example, is also valid and will also be considered correct.
Test case : .
Test case : .
Solution:
solution link 1
https://shareus.in/?i=yScFNErxQ
if 1st link is not work then click on another link
Solution link 2
Solution link 3
Solution link 4
How to get link tutorial video link
No comments:
Post a Comment