Practice · 3 of 3
Digit Harmony
CHALLENGE
Difficulty: advanced+25 XP
**Problem.** Line 1: N (up to 1e18, given as a string). Line 2: k. Print how many x in [1, N] have digitSum(x) divisible by k. **Constraints:** 1 <= N <= 1e18; 2 <= k <= 100. **R versus W.** The graded wrong solution enumerates every number.
Press Submit to check your solution.
Back to lesson: Practice: Mixed Drill — Final Synthesis