Numbers At Most N Given Digit Set
Hard
Digit & Number DP
Given a sorted set of digits (each 1-9) that may be used any number of times, print how many positive integers up to n can be written using only those digits.
Constraints
1 <= d <= 9 1 <= n <= 10^9
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.