My issue
For this problem, my code works well for all the testcases but except the last one. I could not find what would be the edge case or where my code fails, Can anyone figure it out?
My code
import bisect
for MIGHTY in range(int(input())):
n = int(input())
l = list(map(int,input().split()))
x = sorted(l)
ans = 0
for i in range(n) :
now = (pow(l[i], 1/(i+1)))
y = bisect.bisect_right(x, now)
ans += y
print(int(ans))
Problem Link: Powered Parameters Practice Coding Problem - CodeChef