You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 1689. Partitioning Into Minimum Number Of Deci-Binary Numbers
2
+
3
+
## Solution
4
+
5
+
- 시간복잡도: O(N) (N은 주어진 문자열의 길이)
6
+
7
+
- 알고리즘
8
+
9
+
구현
10
+
11
+
- 풀이설명
12
+
13
+
주어진 수 `n`을 최소 몇 개의 **decy-binary** 의 합으로 나타낼 수 있는지 출력하는 문제입니다. `n`의 각 자릿수 중 최댓값만큼의 **decy-binary** 만 합하면 있으면 나타낼 수 있습니다. 어차피 **decy-binary**는 각 자릿수가 0 아니면 1이기 때문입니다.
14
+
15
+
예를 들어 12345같은 경우 1의 자리에 속하는 5를 나타내기 위해선 결국 1을 다섯번 더하는 수 밖에 없습니다. **decy-bianry**를 최소 개수로 합하는 경우를 구하기 때문에 덧셈 올림은 고려하지 않아도 됩니다.
0 commit comments