From eef4cd9ade3e8c98cffe3ba36c804046e5594ce3 Mon Sep 17 00:00:00 2001 From: ktkovachev <143198904+ktkovachev@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:38:50 +0100 Subject: [PATCH] Solve 67. Add Binary --- python/67_add_binary.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 python/67_add_binary.py diff --git a/python/67_add_binary.py b/python/67_add_binary.py new file mode 100644 index 0000000..d451827 --- /dev/null +++ b/python/67_add_binary.py @@ -0,0 +1,3 @@ +class Solution: + def addBinary(self, a: str, b: str) -> str: + return bin(int(a, 2) + int(b, 2))[2:]