Suppose in CS203, the number system only has three values 2,3,6. It holds 2<3<6. Given an integer \(n\), please find the \(n\)-th smallest number in CS203 number system.
Suppose in CS203, the number system only has three values 2,3,6. It holds 2<3<6. Given an integer \(n\), please find the \(n\)-th smallest number in CS203 number system.
The 1st line contains an integer \(T(1 \leq T \leq 10^3)\), the number of test cases.
Next \(T\) lines, each line contains an integer an integer \(n (1 \leq n \leq 10^9)\)
For each test case, print a line, represent the \(n\)-the smallest number in CS203 number system.
2
1
6
2
26