일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Python Code
- 109. Convert Sorted List to Binary Search Tree
- 컴퓨터의 구조
- 운영체제
- 시바견
- 프로그래머스
- t1
- shiba
- 43. Multiply Strings
- Class
- data science
- Python
- kaggle
- LeetCode
- Substring with Concatenation of All Words
- Protocol
- Python Implementation
- 30. Substring with Concatenation of All Words
- attribute
- iterator
- Generator
- Decorator
- 315. Count of Smaller Numbers After Self
- Regular Expression
- Convert Sorted List to Binary Search Tree
- 715. Range Module
- concurrency
- DWG
- 밴픽
- 파이썬
Archives
- Today
- Total
Scribbling
LeetCode: 171. Excel Sheet Column Number 본문
Computer Science/Coding Test
LeetCode: 171. Excel Sheet Column Number
focalpoint 2021. 12. 20. 13:04class Solution:
def titleToNumber(self, columnTitle: str) -> int:
ret = 0
order = 1
for char in columnTitle[::-1]:
ret += order * (ord(char) - 64)
order *= 26
return ret
'Computer Science > Coding Test' 카테고리의 다른 글
LeetCode: 202. Happy Number (0) | 2021.12.21 |
---|---|
LeetCode: 191. Number of 1 Bits (0) | 2021.12.21 |
LeetCode: 125. Valid Palindrome (0) | 2021.12.20 |
LeetCode: 101. Symmetric Tree (0) | 2021.12.19 |
LeetCode: 236. Lowest Common Ancestor of a Binary Tree (0) | 2021.12.15 |