the best solution
Intuition\nP.S. the title is a serious exagration\n\nsplit it up, see what each digit is, add the negative sign when needed.\n\n# some stuff\nAlso, if you like 
# Intuition\nP.S. the title is a serious exagration\n\nsplit it up, see what each digit is, add the negative sign when needed.\n\n# some stuff\nAlso, if you like the 2nd code snippet or just appreciat the short explanation and 1st code, plz upvote!\n\n# Code\nmy real code\n```\nclass Solution:\n    def convertToBase7(self, num: int) -> str:\n        res = ""\n        if num < 0: res += "-"\n        num = abs(num)\n        for endPow in range(0, 10):\n            if num // (7**endPow) < 7:\n                break\n        for i in range(endPow, -1, -1):\n            char = str(num // (7**i))\n            res += char\n            num -= (7**i) * (num // (7**i))\n        return res\n```\n\nmy totally ridiculous unexplainable code\n```\nclass Solution:\n    def convertToBase7(self, num: int) -> str:\n        someString = ""\n        if num < 0 and ((num * 2) + 99 - 99) / 2 == num: \n            num = abs(num)\n            someString += "-"\n        num = abs(num)\n        for endPow in range(0, 10):\n            n = num / (7**endPow)\n            realN = ""\n            for char in str(n):\n                if char == ".": break\n                realN += char\n            if int(realN) <= 6:\n                break\n        for i in range(endPow, -1, -1):\n            char = str(num // (7**i))\n            someString += char\n            num -= (7**i) * (num // (7**i))\n        return someString\n```
['Python3']