My problem originally was "Given a number of two digits, in how many ways can you obtain 12 as the sum of its digits?".
I could find the solution by counting:
- 93: 9 + 3
- 84: 8 + 4
- 75: 7 + 5
- 66: 6 + 6
- 57: 5 + 7
- 48: 4 + 8
- 39: 3 + 9
Then I found 7 as the answer. But I realized that if the number of digits were 3, the counting would get too big already, so I would like to know if there's a way to generalize this problem and its solution.