A deck has 900 cards numbered from 100 to 999. Cards whose sum of digits is the same have the same color, and cards with different sums have different colors. Alice, Bia, Carla, and Dani each take a certain number of cards.

a) All the cards Alice took had different colors. What is the maximum number of cards Alice could have taken?

b) Bia took all the cards that contain the digit 1. How many cards did Bia take?

c) Carla took all the cards with exactly 2 identical digits. How many cards did Carla take?

d) Dani said: - I took two cards of the same color with consecutive numbers. Is it possible for this to have happened?
Solution

a) 27 cards. The maximum number of cards Alice picked corresponds to the number of different sums of the digits of the numbers from 100 to 999. Since the smallest sum is $1+0+0=1$ and the largest is $9+9+9=27$, the total number of sums is 27. To ensure that all these sums exist, we can list an example of each sum: 100, 101, 102, $103,104,105,106,107,108,109,920,921,922,923,924,925,926,927,928,929,939$, 949, 959, 969, 979, 989, 999.
b) 233 cards. From 100 to 199, all contain the digit 1, that is, 100 cards; from 200 to 299, there are 19 cards (201, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 221, 231, 241, 251, 261, 271, 281, 291); from 300 to 399, from 400 to 499, and so on, it is the same number as from 200 to 299. Therefore, the total number of cards that contain the digit 1 is $100+7 \cdot 19=233$.

c) 243 cards. Let's count how many cards have exactly the digit 1 twice. With the 1 in the units place and the tens place, there are 8 possibilities, since 0 cannot occupy the hundreds place, while with the 1 in the units place and the hundreds place, as well as in the tens place and the hundreds place, there are 9 possibilities each. Therefore, there are $8+9+9=26$ cards with the digit 1 repeating exactly 2 times. For the other digits, except for zero, this quantity repeats. The zero will repeat exactly twice in the numbers $100,200,300, \ldots, 900$, that is, 9 times. Therefore, the total number of cards Carla picked is $9 \cdot 26+9=243$.

d) Impossible. There are 3 cases of consecutive numbers: