All submissions for this problem are available.
Sampada is making questions for the Pravega event Crypto. While working on encryption, she has discovered that any cipher (which is a positive integer) which has any substring not divisible by 2 is bad and can be cracked. She has also discovered that any cipher which has a substring divisible by 11 is also bad and can be cracked easily. She believes all other ciphers are good.
Help Sampada find the kth cipher, in ascending order, which is good.
In a good cipher, every substring is divisible by 2 and none are divisible by 11.
The first line of input has a single integer T, the total number of test cases. The next T lines each have an integer k on them.
The output should contain T integers on T different lines, the kth good cipher.
1 ≤ T ≤ 50000
1 ≤ k ≤ 1500000
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, GO|
Fetching successful submissions
If you are still having problems, see a sample solution here.