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
sumanth2015:
20160816 22:33:09
AC in first try itself!! Thank god. I tried for 2 hrs in java...reduced execution time from 15 minutes to 0.13 seconds.... ;) in between I wished for i9 processor ;) ... Nothing much in the program...a smaalllll logic. Just figure it out and you are done. Last edit: 20160816 22:34:42 

nikhil03:
20160816 18:39:48
Comments can sometimes be helpful!!!


cnexans:
20160728 01:54:49
I got WA because of the boundary limit, 2000000000000. Be careful about that. Pretty easy :) it would be nice to prove the pattern mathematically. GL 

sandeep_123:
20160724 17:27:08
very easy problem! only thing is finding pattern 

warriorvr9:
20160623 16:10:07
Easy one! 

Rahadian Koesdijarto Putra:
20160619 11:58:42
Should you need to find the pattern, try to precompute it! Saves you lots of time!


ajay_raj:
20160617 23:12:34
Find the pattern :) 

ujjwalverma:
20160607 08:44:51
Bad explanation!


top_gun007:
20160606 12:51:32
Easy 

sweatygenius:
20160603 17:31:39
DO NOT READ ANY COMMENTS, THEY WILL RUIN THE QUESTION FOR YOU.

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 