Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution:
- # @param A : string
- # @param B : string
- # @return a strings
- def addBinary(self, A, B):
- return str(bin(int(A, 2)) + bin(int(B, 2)))
- s = Solution()
- #expect "111" receives 0b110b100
- print(s.addBinary("11", "100"))
Advertisement
Add Comment
Please, Sign In to add comment