Cube Root
Time limit1sMemory limit128 MB
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 . Each test case is a single line containing one number whose cube root is to be computed. This number has at most digits and may have leading zeros.
Output
For each test case, print the cube root of the given number to digits after the decimal point. The value must be truncated (rounded down), not rounded to nearest.