๐ WAYPOINT LESSON
Checkpoint โ Digit Sums
โญ beginnerโณ 40 min read๐ Lesson 160 of 281
A heavy query load of exact-K digit-sum counts; the tight-flag drop that undercounts every boundary is the graded wrong answer.
Checkpoint โ Digit DP. Each line: L R K (read until EOF). Print, per line, the count of x in [L, R] with digit sum exactly K.
The tight flag is the entire difficulty: dropping it undercounts.