random answer. Computer science. Today the kindergarten has another gathering of n kids who should be situated during supper. The seats at the table are numbered from 1 to 4n. Two children can't sit on a similar seat. It is realized that two children who sit on seats with numbers an and b (a≠b) will enjoy if: gcd(a,b)=1 or,
Correct answer will be upvoted else Multiple Downvoted. Don't submit random answer. Computer science.
Today the kindergarten has another gathering of n kids who should be situated during supper. The seats at the table are numbered from 1 to 4n. Two children can't sit on a similar seat. It is realized that two children who sit on seats with numbers an and b (a≠b) will enjoy if:
gcd(a,b)=1 or,
a partitions b or b separates a.
gcd(a,b) — the greatest number x with the end goal that an is distinct by x and b is detachable by x.
For instance, if n=3 and the children sit on seats with numbers 2, 3, 4, then, at that point, they will enjoy since 4 is isolated by 2 and gcd(2,3)=1. On the off chance that children sit on seats with numbers 4, 6, 10, they won't enjoy.
The educator truly doesn't need the wreck at the table, so she needs to situate the children so there are no 2 of the child that can enjoy. All the more officially, she needs no pair of seats an and b that the children possess to satisfy the condition above.
Since the educator is extremely occupied with the diversion of the children, she requested that you tackle this issue.
Input
The principal line contains one integer t (1≤t≤100) — the number of experiments. Then, at that point, t experiments follow.
Each experiment comprises of one line containing an integer n (1≤n≤100) — the number of children.
Output
Output t lines, which contain n unmistakable integers from 1 to 4n — the numbers of seats that the children ought to involve in the comparing experiment. In case there are different replies, print any of them. You can print n numbers in any request.
Step by step
Solved in 4 steps with 1 images