← All problemsSign in

David Numbers

## Problem Statement David loves to play with numbers. Today, he's trying to make numbers who's digits add up to exactly k. For example, if k = 7, the first number which satisfies this is 7 the second number is 16 the third is 25 and so on David wants to find the nth smallest number, who's digit add up to atleast k. Can you help him with this problem? ## Constraints 1 <= n <= (3

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start