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
abhishyam:
20150812 11:22:30
Problem Explanation is not clear.....


ROHIT Kumar:
20150802 13:27:28
easy qustn but the clarity of question is very poor...output not explained precisely . 

Anant Upadhyay:
20150802 13:22:57
nice on hocs........ but question not explained clearly!!


Anurag Sharma:
20150802 13:02:08
nice adhoc.... 

richatibrewal:
20150730 17:38:35
To solve this problem, do we have to note the first few numbers whose cubes end in 888 or we have an alternate solution? 

knightwood:
20150728 11:17:47
my favourite number is 250 

einsdurchnull:
20150726 13:04:03
What does k^th number mean? From what I understand the example formula has to be "(1^192)^3" , or? But that's 1. I see that 192^3 = ...888. But where is k in this formula? Is it suppoesed to be (k*192)^3 ... I don't get it ... . Maybe it's because I'm not a native speaker of English, and I oversee something?!


r0bo_dart:
20150721 17:48:05
easy 

hacker_1995:
20150702 14:13:15
you can find the solution and logic here. it's an easy pattern. give it a try if not able to resolve then go to


Ankush :
20150622 10:33:18
O(1) :D 
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 