Technique
Two digits adding to : there are ways when is 9 or less
Quantitative Aptitude • Number System
Statement
To count numbers whose digits add up to a total, fix the first digit, then count the ways the remaining two digits can make what is left. If the two digits must add up to and is at most 9, the tens digit can be any of and the units digit is then fixed. That gives ways. For from 10 to 18 the count is , because both digits must stay 9 or less.
How to use it
- 1Fix the leading digit, and find what the other two digits must add up to.
- 2For a remainder , count pairs; list them if the numbers are few.
- 3Add the counts for each leading digit, and check the end of the range separately.
Worked example
How many numbers from 400 to 599 have digits adding up to 7?
Step-by-step
- 1Leading 4: the other two add to 3, so numbers (403, 412, 421, 430).
- 2Leading 5: the other two add to 2, so numbers (502, 511, 520).
- 3Total .
Answer
7
Watch out
Forgetting the pair with a 0, such as 430 or 403, gives one fewer. For sums above 9 the rule no longer works, because a digit cannot be 10 or more.
Also known as
digit sum count, numbers with digit sum, pairs of digits with a given sum, count by leading digit