python beats 100%
\nclass Solution(object):\n    def convertToBase7(self, num):\n        """\n        :type num: int\n        :rtype: str\n        """\n        isNegative = False
```\nclass Solution(object):\n    def convertToBase7(self, num):\n        """\n        :type num: int\n        :rtype: str\n        """\n        isNegative = False if num > 0 else True\n        lst = []\n        res = 0\n        num = abs(num)\n        while num > 0:\n            lst.append(num%7)\n            num = num/7\n        for i in range(len(lst)):\n            res += 10**i * lst[i]\n        return str(-res if isNegative == True else res)\n```
[]