You can try to bruteforce it out and just increment by 0.01 maybe that will work out.
But the answer wouldnt be exact.
So u can try in for an approx val.

Then test it up. If the value you got. is squared is lesser than the main number of which you should find the square root then increment. But if the the square of the value increases take the previous number as the approximate square root. So you will only be missing the minutest details

import java.util.Scanner;
public class LuckySevens {
private int diceLength;
private int rolls;
private int sides;
private int numRolls = 0;
public static void main (String [] args) {
Scanner reader ...