def solution2(l):
    divs = [[0, 0] for _ in l]
for i in range(len(l)):
    for j in range(i + 1, len(l)):
        if l[j] % l[i] == 0:
            divs[j][0] += 1
divs[j][1] += divs[i][0]
return sum(x[1] for x in divs)
Given a list with a number of elements, how can I get the number of perfect triples?