Python Code


  • 0
    T
    class Solution(object):
        def addBinary(self, a, b):
            sum = int("%s"%a, 2) + int("%s"%b, 2)
            return "{0:b}".format(sum)
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.