✅ Python one-line
Simply a + b = \log_x(x^a * x^b)\n\n# Code\n\nimport math\n\n\nclass Solution:\n    def getSum(self, a: int, b: int) -> int:\n        return int(math.log(2 ** a
Simply $$a + b = \\log_x(x^a * x^b)$$\n\n# Code\n```\nimport math\n\n\nclass Solution:\n    def getSum(self, a: int, b: int) -> int:\n        return int(math.log(2 ** a * 2 ** b, 2))\n```
['Python3']