I have a couple of time complexity questions regarding Common Prime Divisors task in Codility. The problem is as follows:
A prime is a positive integer X