Add Binary
Dễ📝 Chuỗi (Strings) 5000ms 256MB
Add Binary
Đề bài
Cộng hai chuỗi nhị phân.
Ví dụ
Ví dụ 1:
Input: "11", "1"
Output: "100"
Ví dụ 2:
Input: "1010", "1011"
Output: "10101"
Ràng buộc
- Dữ liệu đầu vào luôn hợp lệ
Case 1
Input = "11"\n"1"
Output = "100"
Case 2
Input = "1010"\n"1011"
Output = "10101"