일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 프로그래머스
- 30. Substring with Concatenation of All Words
- DWG
- Python
- Class
- concurrency
- 715. Range Module
- attribute
- Convert Sorted List to Binary Search Tree
- 밴픽
- 파이썬
- data science
- Substring with Concatenation of All Words
- iterator
- 시바견
- 315. Count of Smaller Numbers After Self
- Generator
- 컴퓨터의 구조
- 109. Convert Sorted List to Binary Search Tree
- Regular Expression
- shiba
- t1
- kaggle
- 43. Multiply Strings
- LeetCode
- 운영체제
- Protocol
- Python Code
- Python Implementation
- Decorator
Archives
- Today
- Total
목록N으로 표현 (1)
Scribbling
프로그래머스: N으로 표현
난이도가 높지는 않은 문제. N을 1개씩 늘려가면서 완전탐색하되, number가 있는지 확인한다. 예컨대... 5가 네개인 경우를 완전탐색하려면, (5, 5, 5, 5) (5) + (5, 5, 5) (5, 5) + (5, 5) (5, 5, 5) + (5) 위의 모든 케이스를 다 따져 주면 된다. 여기서 +는 더하라는 의미가 아니라, 왼쪽에서 발생되는 모든 케이스와 오른쪽에서 발생되는 모든 케이스를 조합하는 모든 케이스를 생성하라는 의미이다. def solution(N, number): if number == N: return 1 dp = [[] for _ in range(9)] dp[1] = [N] for i in range(2, 9): dp[i].append(int(str(N)*i)) for j in ..
Computer Science/Coding Test
2021. 10. 25. 20:55