codeforces/596A_pool.py
def calculate(self):
        """ Main calcualtion function of the class """

        result = 0
        m = min(3, len(self.numa))

        for i in range(m):
            for j in range(i+1, m):
                result += abs(
                    (self.numa[i] - self.numa[j]) *
                    (self.numb[i] - self.numb[j]))
        if result == 0:
            result = -1

        return str(result)
 Main calcualtion function of the class 
Main calcualtion function of the class
Main calcualtion function of the class
def calculate(self):
        result = 0
        m = min(3, len(self.numa))
        for i in range(m):
            for j in range(i+1, m):
                result += abs(
                    (self.numa[i] - self.numa[j]) *
                    (self.numb[i] - self.numb[j]))
        if result == 0:
            result = -1
        return str(result)
def calculate ( self ) : result = 0 m = min ( 3 , len ( self . numa ) ) for i in range ( m ) : for j in range ( i + 1 , m ) : result += abs ( ( self . numa [ i ] - self . numa [ j ] ) * ( self . numb [ i ] - self . numb [ j ] ) ) if result == 0 : result = - 1 return str ( result )
Main calcualtion function of the class
Main calcualtion function of the class
""" Main calcualtion function of the class """
self