You are on page 1of 1

import math

n = 5*10**5

sq = []
i = 1
while(i<=n):
sq.append(i*i)
i += 1

table = []

for x in sq:
for j in range(2,int(math.sqrt(x))):
if(x%j!=0): continue
else:
p = [x,j,x/j]
p.sort()
table.append(p)

print len(table)

You might also like