Leetcode/python/67_add_binary.py

4 lines
110 B
Python
Raw Normal View History

2024-04-08 15:38:50 +00:00
class Solution:
def addBinary(self, a: str, b: str) -> str:
return bin(int(a, 2) + int(b, 2))[2:]