EIGHTS  Triple Fat Ladies
Pattern Matchers have been designed for various sorts of patterns. Mr. HKP likes to observe patterns in numbers. After completing his extensive research on the squares of numbers, he has moved on to cubes. Now he wants to know all numbers whose cube ends in 888.
Given a number k, help Mr. HKP find the k^{th} number (indexed from 1) whose cube ends in 888.
Input
The first line of the input contains an integer t, the number of test cases. t test cases follow.
Each test case consists of a single line containing a single integer k (1 <= k <= 2000000000000).
Output
For each test case, output a single integer which denotes the k^{th} number whose cube ends in 888. The result will be less than 2^{63}.
Example
Input: 1 1 Output: 192
hide comments
rishabhcha:
20161214 10:57:19
little analysis of pattern after that just two lines code in python


soodan:
20161208 09:24:29
o(1) in c AC in one go !!! 

mohitgupta07:
20161116 15:41:49
5 line code with python 2.7 :) :) btw the soln is O(1) for each loop. :) :) Just find when 8 comes at the end in a cube of a number. You'll get the answer :D :D 250!!! ;) 

aronzx:
20161030 15:12:34
Did DP first then realized the massive runtime, so noticed something on the console. AC in one go :) 

sandeep_4141:
20161022 20:14:59
finally AC...awwww ...use Multiprecision in c++..make it easy problem. 

l0gic_b0mb:
20160925 18:28:19
Looks difficult at the first glance, but appearances are deceptive. :P 

narutohokage_1:
20160902 04:41:54
Do not start reading comment before doing the program.


samishamshi:
20160829 22:01:16
I am not able to understand the question can anybody can explain it to me 

vsbtechs:
20160823 11:42:43
EASY..but beware :) 

rock_lee:
20160822 08:38:27
hi sweatygenius :3 
Added by:  Matthew Reeder 
Date:  20061030 
Time limit:  1.197s 
Source limit:  30000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ERL JSRHINO NODEJS PERL6 VB.NET 
Resource:  AlKhawarizm 2006 