digit_dp
Count integers from 1 to N whose digit sum equals a target value, using digit DP to handle large upper bounds.
Instructions
Count integers from 1 to N whose digit sum equals a target value using digit DP.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | Upper bound (positive integer, max 1e15) | |
| target_digit_sum | Yes | Target digit sum (0-135) |