21. The number of natural numbers, between 212 and 999, such that the sum of their digits is 15, is________
Let xyz be any number between 212 and 999
Let x = 2 → y + z = 13, then
(y, z): (4, 9), (5, 8), (6, 7), (7,6), (8, 5), (9, 4), i.e., 6 in number.
Let x = 3 → y + z = 12, then
(y, z) : (3, 9), (4, 8), (5, 7), (6, 6), (7, 5), (8, 4), (9, 3) i.e., 7 in number
Let x = 4 → y + z = 11, then
(y, z) : (2, 9), (3, 8), (4, 7), (5, 6), (6, 5), (7, 4), (8, 3), (9, 2)
i.e., 8 in number.
Let x = 5 → y + z = 10 then
(y, z) : (1, 9), (2, 8) (3, 7), (4, 6), (5, 5), (6, 4), (7, 3), (8, 2), (9, 1) i.e., 9 in number.
Let x = 6 → y + z = 9 then
(y, z) : (0, 9), (1, 8), (2, 7), (3, 6), (4, 5), (5, 4), (6, 3), (7, 2) ,(8 , 1), (9, 0) i.e., 10 in number.
Let x = 7 → y + z = 8 then
(y, z) : (0, 8), (1, 7), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2), (7, 1) (8, 0) i.e., 9 in number.
Let x = 8 → y + z = 7 then
(y, z): (0, 7), (1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1), (7, 0)
i.e., 8 in number.
Let x = 9 → y + z = 6 then
(y, z): (0, 6), (1, 5), (2, 4), (3, 3), (4, 2), (5, 1), (6, 0) i.e., 7 in number.
Total = 6 + 7 + 8 + 9 + 10 + 9 + 8 + 7 = 64
Let xyz be any number between 212 and 999
Let x = 2 → y + z = 13, then
(y, z): (4, 9), (5, 8), (6, 7), (7,6), (8, 5), (9, 4), i.e., 6 in number.
Let x = 3 → y + z = 12, then
(y, z) : (3, 9), (4, 8), (5, 7), (6, 6), (7, 5), (8, 4), (9, 3) i.e., 7 in number
Let x = 4 → y + z = 11, then
(y, z) : (2, 9), (3, 8), (4, 7), (5, 6), (6, 5), (7, 4), (8, 3), (9, 2)
i.e., 8 in number.
Let x = 5 → y + z = 10 then
(y, z) : (1, 9), (2, 8) (3, 7), (4, 6), (5, 5), (6, 4), (7, 3), (8, 2), (9, 1) i.e., 9 in number.
Let x = 6 → y + z = 9 then
(y, z) : (0, 9), (1, 8), (2, 7), (3, 6), (4, 5), (5, 4), (6, 3), (7, 2) ,(8 , 1), (9, 0) i.e., 10 in number.
Let x = 7 → y + z = 8 then
(y, z) : (0, 8), (1, 7), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2), (7, 1) (8, 0) i.e., 9 in number.
Let x = 8 → y + z = 7 then
(y, z): (0, 7), (1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1), (7, 0)
i.e., 8 in number.
Let x = 9 → y + z = 6 then
(y, z): (0, 6), (1, 5), (2, 4), (3, 3), (4, 2), (5, 1), (6, 0) i.e., 7 in number.
Total = 6 + 7 + 8 + 9 + 10 + 9 + 8 + 7 = 64
Let xyz be any number between 212 and 999
Let x = 2 → y + z = 13, then
(y, z): (4, 9), (5, 8), (6, 7), (7,6), (8, 5), (9, 4), i.e., 6 in number.
Let x = 3 → y + z = 12, then
(y, z) : (3, 9), (4, 8), (5, 7), (6, 6), (7, 5), (8, 4), (9, 3) i.e., 7 in number
Let x = 4 → y + z = 11, then
(y, z) : (2, 9), (3, 8), (4, 7), (5, 6), (6, 5), (7, 4), (8, 3), (9, 2)
i.e., 8 in number.
Let x = 5 → y + z = 10 then
(y, z) : (1, 9), (2, 8) (3, 7), (4, 6), (5, 5), (6, 4), (7, 3), (8, 2), (9, 1) i.e., 9 in number.
Let x = 6 → y + z = 9 then
(y, z) : (0, 9), (1, 8), (2, 7), (3, 6), (4, 5), (5, 4), (6, 3), (7, 2) ,(8 , 1), (9, 0) i.e., 10 in number.
Let x = 7 → y + z = 8 then
(y, z) : (0, 8), (1, 7), (2, 6), (3, 5), (4, 4), (5, 3), (6, 2), (7, 1) (8, 0) i.e., 9 in number.
Let x = 8 → y + z = 7 then
(y, z): (0, 7), (1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1), (7, 0)
i.e., 8 in number.
Let x = 9 → y + z = 6 then
(y, z): (0, 6), (1, 5), (2, 4), (3, 3), (4, 2), (5, 1), (6, 0) i.e., 7 in number.
Total = 6 + 7 + 8 + 9 + 10 + 9 + 8 + 7 = 64