我在启动2018年G轮产品三重奏问题时遇到Time_Limit_Exceeded错误:请帮助我
import itertools
T=int(input())
for t in range(1,T+1):
N = int(input())
A = list(map(int,input().split()))
cnt = 0
strings = list(itertools.combinations(A, 3))
for i,j,k in strings:
if (i==j*k) or (j==i*k) or (k==i*j):
cnt += 1
print("Case #{}: {}".format(t, cnt))