일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Python Code
- Python Implementation
- 밴픽
- LeetCode
- 315. Count of Smaller Numbers After Self
- 운영체제
- iterator
- 30. Substring with Concatenation of All Words
- t1
- data science
- Decorator
- kaggle
- 시바견
- 715. Range Module
- Protocol
- Generator
- attribute
- 파이썬
- shiba
- 109. Convert Sorted List to Binary Search Tree
- 컴퓨터의 구조
- Python
- Convert Sorted List to Binary Search Tree
- 프로그래머스
- 43. Multiply Strings
- concurrency
- Class
- DWG
- Regular Expression
- Substring with Concatenation of All Words
Archives
- Today
- Total
목록카펫 (1)
Scribbling
프로그래머스: 카펫
x * y = brown + yellow (x-2) * (y-2) = yellow --> 모든 정수 조합 완전 탐색 def solution(brown, yellow): answer = [] xy_product = brown + yellow candidates = [] for i in range(1, xy_product//2+1): if xy_product % i == 0: candidates.append((xy_product//i, i)) for candidate in candidates: if (candidate[0]-2) * (candidate[1]-2) == yellow: return candidate
Computer Science/Coding Test
2021. 10. 19. 23:16