Eight’s World
CodeChefOpen on judge ↗
Eight dominated the world before aryabhatta. ###Input: - First line contains an integer $T$ denoting the number of test cases. - Each line of the test case consists of an integer $N$. ###Output: Output the result corresponding to each test case in a new line. ###Constraints - $1 \leq T \leq 10^4$ - $1 \leq N \leq 10^{18}$ ###Sample Input: 1 1436 ###Sample Output: 2634
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start