抄袭大佬,需要背公式

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        while (input.hasNextDouble()) {
            double num = input.nextDouble();
            double x = 1.0;
            while (Math.abs(Math.pow(x, 3) - num) > 0.001) {
                x = x - ((Math.pow(x, 3) - num) / (3 * Math.pow(x, 2)));
            }
            System.out.printf("%.1f%n", x);
        }
    }
}