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

        result = []
        for i in range(self.imax):
            num = self.nums[i]
            if self.cnt[num] > 1 or num > self.imax:
                e = self.empty.popleft()
                self.cnt[num] -= 1
                result.append(e)
            else:
                result.append(num)

        return str(" ".join(map(str, result)))
 Main calcualtion function of the class 
Main calcualtion function of the class
Main calcualtion function of the class
def calculate(self):
        result = []
        for i in range(self.imax):
            num = self.nums[i]
            if self.cnt[num] > 1 or num > self.imax:
                e = self.empty.popleft()
                self.cnt[num] -= 1
                result.append(e)
            else:
                result.append(num)
        return str(" ".join(map(str, result)))
def calculate ( self ) : result = [ ] for i in range ( self . imax ) : num = self . nums [ i ] if self . cnt [ num ] > 1 or num > self . imax : e = self . empty . popleft ( ) self . cnt [ num ] -= 1 result . append ( e ) else : result . append ( num ) return str ( " " . join ( map ( str , result ) ) )
Main calcualtion function of the class
Main calcualtion function of the class
""" Main calcualtion function of the class """
self