The task seems pretty easy - on input I get number of tests (`numOfTests`), then two numbers (`downBorder`, `upBorder`) and I have to find how many numbers between those numbers (`downBorder`, `upBorder`) are significant numbers where significant number is a number which arithmetic average of proper divisors(all divisors except one and the same number) are smaller or equal than square root of that number.
I wrote the code and probably it works however it's too slow.
My code:

```
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws java.lang.Exception
    {
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); //faster than Scanner
        int numOfTests = Integer.parseInt(bf.readLine());
        for(int i = 0; i < numOfTests; i++)
        {
            String[] borders = bf.readLine().split(" ");
            long downBorder = Long.parseLong(borders[0]);
            long upBorder = Long.parseLong(borders[1]);
            //System.out.println(String.format("down:  %s, up: %s", downBorder, upBorder));
            System.out.println(countNumberOfSignificantNumbers(downBorder, upBorder));
        }
    }

    /**
     * print numbers of significant numbers - (arithmetic average of all divisors that is not bigger than root of that number)
     * e.g 4 is significant but 6 is not
     * @param downBorder
     * @param upBorder
     */
    private static int countNumberOfSignificantNumbers(Long downBorder, Long upBorder) {
        int numberOfSignificantNumbers = 0;
        for(Long i = downBorder; i <= upBorder; i++)
        {
            if(i%2 != 0)
                continue;
            else
            {
                double avgOfProperDivisors = getAvgArithOfSumOfNumberDividers(i);
                if(avgOfProperDivisors != 0 && avgOfProperDivisors <= Math.sqrt(i))
                    numberOfSignificantNumbers++;
            }
        }
        return numberOfSignificantNumbers;
    }

    /**
     * method returns the arithemtic average of all proper divisors (all divisors except one and number itself)
     * @param number
     * @return
     */
    public static double getAvgArithOfSumOfNumberDividers(Long number)
    {
        long maxD = number/2;
        long sum=0;
        long numOfDivs = 0;
        for(long i = 2; i <= maxD; i++)
        {
            if(number % i == 0)
            {
                numOfDivs++;
                sum += i;
            }
        }
        return (numOfDivs > 0) ? (double)sum/numOfDivs : 0;
    }
}

```

The bottleneck in this task is counting average of divisors. How can I make it better and faster?

```
Example input:
2
4 6
1 3

Example output:
1
0

```