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

        result = 0
        for (i, n) in enumerate(self.nums):
            result += self.summ - self.genr[n-1]

        return str(result//2)
 Main calcualtion function of the class 
Main calcualtion function of the class
Main calcualtion function of the class
def calculate(self):
        result = 0
        for (i, n) in enumerate(self.nums):
            result += self.summ - self.genr[n-1]
        return str(result//2)
def calculate ( self ) : result = 0 for ( i , n ) in enumerate ( self . nums ) : result += self . summ - self . genr [ n - 1 ] return str ( result // 2 )
Main calcualtion function of the class
Main calcualtion function of the class
""" Main calcualtion function of the class """
self