Project Euler 124 - Ordered Radicals

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