Project Euler 108 - Diophantine Reciprocals I

Official link: https://projecteuler.net/problem=108

Thought Process

From Problem 500 I found an efficient way to calculate divisors

The product of the first 7 primes = 2*3*5*7*11*13*17 = 510510, simply loop through numbers, n, till 510510, calculate the divisors of n^2. The first n we find such that the number of divisors > 2000 is the n we are looking for.

Also incase you didn't get why we are using 2000, instead of the problem 1000, is because each divisor pair is counted twice

Interactive Code

Enter a number (yourinput)

Code will output the minimal n which has more than yourinput distinct solutions