Skip to content

Conversation

@zinnnn37
Copy link
Contributor

🧷 문제 링크

숫자카드

🧭 풀이 시간

20분

👀 체감 난이도

✏️ 문제 설명

34 이하의 숫자카드가 있다고 가정했을 때 입력된 숫자를 기반으로 어떤 숫자카드의 조합을 만들 수 있는지

🔍 풀이 방법

DP

// base case
dp[0] = 1;

// 한자릿수
dp[i] = dp[i-1]; // nums[i] != 0
// 두자릿수
dp[i] += dp[i-2]; // i >= 2 && dp[i-1] > 0 && dp[i-1] * 10 + dp[i] <= 34

⏳ 회고

두자릿수 구할 때 십의자리가 0인 경우를 고려 안해서 틀렸엇음

@ShinHeeEul ShinHeeEul merged commit a2ed470 into main Sep 24, 2025
1 check passed
@zinnnn37 zinnnn37 added the success 👍 해설을 보지 않고 풀었을 때 label Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants