finish 67
This commit is contained in:
parent
ca45976f26
commit
89e23e7654
9
leetcode/67.py
Normal file
9
leetcode/67.py
Normal file
@ -0,0 +1,9 @@
|
||||
# Given two binary strings a and b, return their sum as a binary string.
|
||||
|
||||
|
||||
class Solution:
|
||||
def addBinary(self, a: str, b: str) -> str:
|
||||
int_a = int("0b" + a, 2)
|
||||
int_b = int("0b" + b, 2)
|
||||
int_c = int_a + int_b
|
||||
return bin(int_c)[2:]
|
Loading…
x
Reference in New Issue
Block a user