# Java 8, <s>151</s> <s>111</s> <s>110</s> <s>101</s> 98 bytes <!-- language-all: lang-java --> n->{int r=0,x=10000,i;for(;x-->0;r-=i-n>>-1)for(i=x;i-->1&&(x<i*i|x%i>0||(i=x/i-i)>i););return r;} -10 bytes thanks to *@Nevay*. -3 bytes thanks to *@ceilingcat*. **Explanation:** [Try it here.](https://tio.run/##jZFRT8MgFIXf@yvuiwuYUYuLNguWf@Be9mh8QNaZO7vbhtKlZu1vr7Tu1SABEs75knOAk7kYUTclnQ5fk61M28KrQbomAEi@dEdjS9jNx0UAy@aduArKGFaYrTceLeyAoICJhL7OiCuydV/ILIw1qmPtmOqF0JlyokBBWgvJZxWLXmEw5GrF@he8x6G/Q50Nw@w8oECukSuuXOk7R@DUOKkkpDbdRxVSb@GXGg9wDsXZ3jukz7d3MPy39f679eU5rTufNsHyFTFKLZN8ucOf/lPEl5sIsHneRog8zyPEY3i9WM84so0jyz/9o8yNGZNx@gE) n->{ // Method with integer as parameter and return-type int r=0, // Result-integer, starting at 0 x=10000, // Index-integer `x` for the outer loop, starting at 10,000 i; // Index-integer `i` for the inner loop, uninitialized for(;x-->0; // Loop `x` in the range (10000, 0]: r-=i-n>>-1) // If the MaxMin-Divisor Pair's difference is lower than the input, // add 1 to the result (after every iteration) for(i=x;i-->1 // Inner loop `i` in the range (`x`, 1]: &&(x<i*i // If the current square of `i` is smaller than or equals to `x`, |x%i>0 // and the current `x` is divisible by `i`: ||(i=x/i-i)// Calculate the MaxMin-Division difference >i);); // And stop the inner loop return r;} // After the loops, return the result