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

        result = 1
        cur = self.n
        while cur != 1:
            if cur % 2:
                result += 1
                cur -= 1
            while not cur % 2:
                cur //= 2

        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 = 1
        cur = self.n
        while cur != 1:
            if cur % 2:
                result += 1
                cur -= 1
            while not cur % 2:
                cur //= 2
        return str(result)
def calculate ( self ) : result = 1 cur = self . n while cur != 1 : if cur % 2 : result += 1 cur -= 1 while not cur % 2 : cur //= 2 return str ( result )
Main calcualtion function of the class
Main calcualtion function of the class
""" Main calcualtion function of the class """
self