Olympiad Maths Prep

Track / Stage 7 / 179 of 300 #1579 of 2000

Problem 1579

National olympiad second round; IMO P1/P4
Combinatorics Difficulty 7.3 Find the answer

Wendy randomly chooses a positive integer less than or equal to 20202020. The probability that the digits in Wendy's number add up to 1010 is mn\frac{m}{n} , where mm and nn are relatively prime positive integers. Find m+nm + n.

Official solution

1. Case 1: 2-digit numbers

We need to find all 2-digit numbers whose digits sum to 10. Listing them:
19,28,37,46,55,64,73,82,91 19, 28, 37, 46, 55, 64, 73, 82, 91
This gives us a total of 9 numbers.

2. Case 2: 3-digit numbers

We need to find all 3-digit numbers whose digits sum to 10. We can break this down by the hundreds digit:
- If the hundreds digit is 1, the remaining two digits must sum to 9. The valid combinations are:
109,118,127,136,145,154,163,172,181,190 109, 118, 127, 136, 145, 154, 163, 172, 181, 190
This gives us 10 numbers.
- If the hundreds digit is 2, the remaining two digits must sum to 8. The valid combinations are:
208,217,226,235,244,253,262,271,280 208, 217, 226, 235, 244, 253, 262, 271, 280
This gives us 9 numbers.
- If the hundreds digit is 3, the remaining two digits must sum to 7. The valid combinations are:
307,316,325,334,343,352,361,370 307, 316, 325, 334, 343, 352, 361, 370
This gives us 8 numbers.
- If the hundreds digit is 4, the remaining two digits must sum to 6. The valid combinations are:
406,415,424,433,442,451,460 406, 415, 424, 433, 442, 451, 460
This gives us 7 numbers.
- If the hundreds digit is 5, the remaining two digits must sum to 5. The valid combinations are:
505,514,523,532,541,550 505, 514, 523, 532, 541, 550
This gives us 6 numbers.
- If the hundreds digit is 6, the remaining two digits must sum to 4. The valid combinations are:
604,613,622,631,640 604, 613, 622, 631, 640
This gives us 5 numbers.
- If the hundreds digit is 7, the remaining two digits must sum to 3. The valid combinations are:
703,712,721,730 703, 712, 721, 730
This gives us 4 numbers.
- If the hundreds digit is 8, the remaining two digits must sum to 2. The valid combinations are:
802,811,820 802, 811, 820
This gives us 3 numbers.
- If the hundreds digit is 9, the remaining two digits must sum to 1. The valid combinations are:
901,910 901, 910
This gives us 2 numbers.

Summing these, we get:
10+9+8+7+6+5+4+3+2=54 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 = 54

3. Case 3: 4-digit numbers

We need to find all 4-digit numbers whose digits sum to 10. We can break this down by the thousands digit:
- If the thousands digit is 1, the remaining three digits must sum to 9. The valid combinations are:
1009,1018,1027,1036,1045,1054,1063,1072,1081,1090,1108,1117,1126,1135,1144,1153,1162,1171,1180,1207,1216,1225,1234,1243,1252,1261,1270,1306,1315,1324,1333,1342,1351,1360,1405,1414,1423,1432,1441,1450,1504,1513,1522,1531,1540,1603,1612,1621,1630,1702,1711,1720,1801,1810,1900 1009, 1018, 1027, 1036, 1045, 1054, 1063, 1072, 1081, 1090, 1108, 1117, 1126, 1135, 1144, 1153, 1162, 1171, 1180, 1207, 1216, 1225, 1234, 1243, 1252, 1261, 1270, 1306, 1315, 1324, 1333, 1342, 1351, 1360, 1405, 1414, 1423, 1432, 1441, 1450, 1504, 1513, 1522, 1531, 1540, 1603, 1612, 1621, 1630, 1702, 1711, 1720, 1801, 1810, 1900
This gives us 55 numbers.
- If the thousands digit is 2, the remaining three digits must sum to 8. The valid combinations are:
2008,2017,2026,2035,2044,2053,2062,2071,2080 2008, 2017, 2026, 2035, 2044, 2053, 2062, 2071, 2080
This gives us 9 numbers.

Summing these, we get:
55+2=57 55 + 2 = 57

4. Total number of valid numbers

Summing the valid numbers from all cases, we get:
9+54+57=120 9 + 54 + 57 = 120

5. Probability calculation

The total number of positive integers less than or equal to 2020 is 2020. Therefore, the probability that the digits in Wendy's number add up to 10 is:
1202020=6101 \frac{120}{2020} = \frac{6}{101}

6. **Finding m+n m + n **

Since the probability is 6101\frac{6}{101}, we have m=6m = 6 and n=101n = 101. Therefore:
m+n=6+101=107 m + n = 6 + 101 = 107

The final answer is 107\boxed{107}

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.