• + 1 comment
    def solve(y):
        V = 0
        n = len(y)
        result = []
    
        for num in y:
            count = sum(1 for other_num in y if other_num >= num)
            result.append(count)
    
        [V += (n+1)/ (result[i]+1) for i in range(n)]
        
        return ["%.2f" % V]