【leetcode❤python】 67. Add Binary

class Solution(object):
    def addBinary(self, a, b):
        """
        :type a: str
        :type b: str
        :rtype: str
        """
        resA=int(a,base=2)
        resB=int(b,base=2)
        
        sumAB=bin(resA+resB)
        return sumAB[2:]
       

posted @ 2016-11-13 19:22  火金队长  阅读(242)  评论(0编辑  收藏  举报