Cube Root

Time limit1sMemory limit128 MB

Summary
Compute the cube root of very large integers (up to 150 digits) truncated to 10 decimal places, for multiple test cases.
Level

Medium4 of 10

Topics
Math, Binary search, Implementation
Solved
No attempts yet

Problem

Given a positive integer, write a program that computes its cube root.

Input

The first line contains the number of test cases TT. Each test case is a single line containing one number whose cube root is to be computed. This number has at most 150150 digits and may have leading zeros.

Output

For each test case, print the cube root of the given number to 1010 digits after the decimal point. The value must be truncated (rounded down), not rounded to nearest.

Examples1

  1. Example 1

    Input
    5
    1
    8
    1000
    2
    33076161
    
    Expected output
    1.0000000000
    2.0000000000
    10.0000000000
    1.2599210498
    321.0000000000