| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 |
Tags
- Substring with Concatenation of All Words
- 43. Multiply Strings
- 프로그래머스
- Python Code
- iterator
- Protocol
- 109. Convert Sorted List to Binary Search Tree
- 운영체제
- shiba
- t1
- Decorator
- DWG
- Regular Expression
- Python Implementation
- 시바견
- 파이썬
- 315. Count of Smaller Numbers After Self
- 30. Substring with Concatenation of All Words
- 컴퓨터의 구조
- concurrency
- data science
- LeetCode
- 밴픽
- Convert Sorted List to Binary Search Tree
- attribute
- 715. Range Module
- Python
- Generator
- Class
- kaggle
Archives
- Today
- Total
목록Add Binary (1)
Scribbling
LeetCode: 67. Add Binary
class Solution: def addBinary(self, a: str, b: str) -> str: if len(b) > len(a): a, b = b, a b = '0'*(len(a)-len(b)) + b ret = '' carry = 0 for i in range(len(a)-1, -1, -1): temp = int(a[i]) + int(b[i]) + carry ret += str(temp%2) carry = temp//2 if carry: ret += str(1) return ret[::-1]
Computer Science/Coding Test
2021. 9. 26. 15:23