Link: https://www.nowcoder.com/acm/contest/115/FSource: Niuke.com
Time limit: C/C++ 1 second, other languages 2 seconds
Space limit: C/C++ 32768K, other languages 65536K
64bit IO Format: %lld
Space limit: C/C++ 32768K, other languages 65536K
64bit IO Format: %lld
Topic description
For the equation 2018 * x ^ 4 + 21 * x + 5 * x ^ 3 + 5 * x ^ 2 + 14 = Y,
given the value of Y, can you find the solution of the equation between 0 and 100?
given the value of Y, can you find the solution of the equation between 0 and 100?
Enter description:
Enter a positive integer T on the first line (representing the number of samples) The next group T samples One row per group of samples, enter a real number Y
Output description:
One line outputs the result corresponding to a sample, Output the solution of the equation between 0 and 100, with 4 decimal places after the decimal point; if it does not exist, output -1