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
yasser1110:
20210219 10:02:44
@fawad That's because your are printing 0 in the front in your 1st solution. 

ayush_06:
20210108 21:08:48
Ac in 1st time.... 

fawad:
20200712 13:41:02
cout << front << last << endl; gave wrong answer, but 1000LL*front+(long long)last gave ac. i wonder why weather it waits for endline or not. 

ttaahhssiinn:
20200621 16:36:44
a fun fact why is that name triple fat ladies!!


pradeep_7:
20200520 14:03:04
Hint :


prashantc595:
20200506 09:09:26
ac in first go !!


landi58:
20200430 20:31:26
Just AP.. a=192, d=250;


trulyness:
20200418 11:10:35
Tips to solve this problem:


manish_thakur:
20191111 11:36:11
ac in first go ( happened to me first time), find the pattern 

emtiaz_001:
20190827 16:57:11
ac in first go. just use the formula and try to understand the concept 
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 