Python One Line Solution Using Exponent Rules
\nclass Solution(object):\n    def getSum(self, a, b):\n        """\n        :type a: int\n        :type b: int\n        :rtype: int\n        """\n        retur
```\nclass Solution(object):\n    def getSum(self, a, b):\n        """\n        :type a: int\n        :type b: int\n        :rtype: int\n        """\n        return int(log(2 ** a * 2 ** b)/log(2))\n```\n\nMy solution takes advantage of the exponent rule that a ^ x * a ^ y = a ^ (x + y). Thus, to compute (x + y) we can first compute a ^ x * a ^ y, (in my code, I let a = 2). After doing that, we can take the log base 2 of the result in order to compute x + y. In order to do log base 2 given log base 10, we have to use the change of base formula, which is log (N)/log(2), where N is the number that you want to find the log base 2 of.
[]