Problem 1. A diagram of a house consists of a square and an equilateral triangle of the same side length. What is the size of the marked angle in degrees? ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-01.jpg?height=439&width=242&top_left_y=223&top_left_x=907) Result. $105^{\circ}$ Solution. Note that the extra segment is a base of an isosceles triangle with angles $150^{\circ}, 15^{\circ}, 15^{\circ}$. The sought angle is $180^{\circ}-60^{\circ}-15^{\circ}=105^{\circ}$. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-01.jpg?height=857&width=494&top_left_y=808&top_left_x=787) Problem 2. Members of a sport team are posing for a photo. They stand in a row and all of them are wearing team jerseys numbered by some distinct positive integers. The photographer notices that the one standing at the right end of the row has number 72 and that the number of any other team member divides the number of his neighbour on the right (the sides are given from the point of view of the photographer). How many athletes at most could be standing there? Result. 6 Solution. Starting at the rightmost number 72 and moving left, the next number always equals the former one divided by a positive integer $n>1$. Since $72=2^{3} \cdot 3^{2}$ and with each step exponent of some prime decreases, hence we cannot have more than $1+3+2=6$ athletes. This is attained e.g. by the sequence $1,2,4,8,24,72$. Problem 3. In an ensemble of string players, everyone can play the violin or the viola and exactly one quarter of all the members can play both the instruments. Furthermore, we know that 32 people can play the violin and 23 can play the viola. How many members are there altogether? Result. 44 Solution. Let $n$ be the sought number of group members. When we add the counts 23 and 32, we obtain the total number of members, but with counting twice each member who can play both the instruments. Since there are $n / 4$ such members, we infer that $$ 23+32=55=n+\frac{n}{4}=\frac{5}{4} n $$ hence $n=44$. Problem 4. Cecil has multiplied five consecutive positive integers, obtaining number $C$. David has done the same, but his sequence started with a number one greater than Cecil's, leading to the product $D$. What was the smallest of the numbers that David multiplied, provided that $C / D=4 / 5$ ? Result. 21 Solution. Assume that $n$ is Cecil's first number, then $C=n(n+1)(n+2)(n+3)(n+4)$. David starts with $n+1$, so $D=(n+1)(n+2)(n+3)(n+4)(n+5)$. We have $$ \frac{4}{5}=\frac{C}{D}=\frac{n(n+1)(n+2)(n+3)(n+4)}{(n+1)(n+2)(n+3)(n+4)(n+5)}=\frac{n}{n+5} $$ Solving this equation for $n$ leads to $n=20$. Since we seek David's smallest number, the answer is 21 . Problem 5. To each small triangle assign the number of small triangles with which it shares an edge. Determine the sum of all these numbers. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-02.jpg?height=323&width=368&top_left_y=655&top_left_x=844) Result. 168 Solution. There are 18 boundary triangles with two neighbours and 3 triangles with just one neighbour. The remaining $64-18-3=43$ triangles have three neighbours and hence the result is $3 \cdot 43+2 \cdot 18+3=168$. Problem 6. Find the largest positive integer $n$ such that $n^{2}-5 n+6$ is a prime number. Result. 4 Solution. Since for any integer $n$ the number $n(n-5)$ is a product of odd and even numbers, we infer that $n^{2}-5 n+6=n(n-5)+6$ is even. Since the only even prime number is 2 , we get the equation $n^{2}-5 n+6=2$, the solutions of which are 1 and 4 . The sought largest integer is therefore 4 . Another possible solution is to note directly that $n^{2}-5 n+6=(n-2)(n-3)$ can be a prime number only if one of the brackets equals $\pm 1$. Largest such number is 4 and the quadratic expression evaluated at 4 indeed yields the prime number 2 . Problem 7. Two circles of radii 1 are touching in the centre of a big circle which is also tangent to the two smaller circles. Determine the length of the dashed segment, which is tangent to the smaller circles and its endpoints lie on the big circle as in the picture. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-02.jpg?height=474&width=472&top_left_y=1645&top_left_x=792) Result. $\quad 2 \sqrt{3} \doteq 3.46410$ ## Solution. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-02.jpg?height=468&width=466&top_left_y=2210&top_left_x=795) The dashed segment is located 1 unit above the horizontal diameter of the big circle. The centre of the big circle, one of the endpoints of the dashed segment and the point "on the top" of the big circle thus form an isosceles triangle with vertical base and one other side of length 2. The result is thus twice the length of an altitude in the equilateral triangle of side length 2 and can be computed e.g. by the Pythagorean theorem. Problem 8. Four mathematicians sat around a table and have ordered a large bowl of pretzels. Daniel left for the toilet. Each minute, Adam, Beatha and Cyril took one pretzel, divided it into three equal pieces and ate it. After some time, Daniel returned to the table and they all continued eating one pretzel each minute, but Daniel got to eat $2 / 5$ of each pretzel, while the others got to eat $1 / 5$. After some time, Adam noted that Daniel ate exactly the same portion as himself. What is the ratio of time in which Daniel was absent to the time he was present? Result. $3 / 5$ Solution. Let $t_{a}$ be the time for which Daniel was absent and $t_{p}$ the time for which he was present. Adam and Daniel ate the same amount of pretzels, so $$ \frac{2}{5} t_{p}=\frac{1}{3} t_{a}+\frac{1}{5} t_{p} \Rightarrow \frac{t_{a}}{t_{p}}=\frac{3}{5} $$ Problem 9. An exchange office in Prague offers these coins: 1 Czech crown for 40 cents, 2 crowns for 50 cents, 5 crowns for 1 euro, 10 crowns for 2 euros, 20 crowns for 4.1 euros and 50 crowns for 9.9 euros. Mark wants to exchange all of his 11.8 euros, but he does not want to buy more than one coin of each type. How much will he get (in Czech crowns)? Find the sum of all solutions. Result. 58 Solution. We have to solve the equation $11.8=0.4 \cdot x_{1}+0.5 \cdot x_{2}+1 \cdot x_{3}+2 \cdot x_{4}+4.1 \cdot x_{5}+9.9 \cdot x_{6}$ where all $x_{i}$ must be in the set $\{0,1\}$. Since $0.4+0.5+1+2+4.1<11.8$, we know that $x_{6}$ must be 1 . Therefore, the equation reads $1.9=0.4 \cdot x_{1}+0.5 \cdot x_{2}+1 \cdot x_{3}+2 \cdot x_{4}+4.1 \cdot x_{5}$. Since by choosing $x_{4}=1$ or $x_{5}=1$ the amount spent will exceed 11.8 euros, we need to set $x_{4}=x_{5}=0$. Because of $0.4+0.5+1=1.9$, the only solution is $x_{1}=x_{2}=x_{3}=x_{6}=1$ and $x_{5}=x_{4}=0$. Therefore, Mark will get $1+2+5+50=58$ Czech crowns. Problem 10. In a regular grid of unit squares these fourteen points are marked. How many rectangles are there having four marked points as their vertices? ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-03.jpg?height=317&width=349&top_left_y=1378&top_left_x=862) Result. 27 Solution. Seven types of rectangles can be found in the shown part of the grid: ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-03.jpg?height=628&width=326&top_left_y=1833&top_left_x=865) There are 7 unit squares, 2 squares of size $2 \times 2,4$ squares like the one with dotted lines, and 2 like the one with dashed lines. In addition, there are 8 rectangles of size $1 \times 2,2$ rectangles of size $1 \times 3$, and 2 rectangles like the one with the dashed lines. Altogether, we count $7+2+4+2+8+2+2=27$ rectangles. Problem 11. What is the value of the positive integer $n$ for which the least common multiple of 60 and $n$ is larger by 777 than the greatest common divisor of 60 and $n$ ? Result. 39 Solution. We wish to solve the equation $\operatorname{lcm}(60, n)=777+\operatorname{gcd}(60, n)$. The greatest common divisor must be a divisor of 60 , i.e. it must be one of the numbers $1,2,3,4,5,6,10,12,15,20,30$, or 60 . Of those divisors, only the number 3 can be added to 777 to obtain a multiple of 60 . Thus $\operatorname{gcd}(60, n)=3$ and $\operatorname{lcm}(60, n)=780$. Then $60 \cdot n=3 \cdot 780$, so $n=39$. Problem 12. An ant sits in the centre of a face of a regular tetrahedron of edge length 1. By crawling on the surface of the tetrahedron it wants to get to the centre of an edge that does not lie on the same face as the ant sits in. What is the length of the shortest way that it needs to walk to get there? Result. $\quad \sqrt{7 / 12} \doteq 0.76376$ Solution. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-04.jpg?height=646&width=713&top_left_y=645&top_left_x=680) Let us "unwrap" the surface of the tetrahedron as shown by the figure. The ant sits at the point $A$ and wants to get to $B$. Since the net is planar, the shortest way has to be a line segment (dashed line). We get $|P D|$ from the Pythagorean theorem as $|P D|^{2}=|C D|^{2}-|C P|^{2}=1^{2}-(1 / 2)^{2}=3 / 4$, i.e., $|P D|=\sqrt{3 / 4}$. Thus $$ |A D|=\frac{2}{3}|P D|=\frac{2}{3} \sqrt{\frac{3}{4}} $$ Since $|D B|=1 / 2$, we can apply the Pythagorean theorem once again and compute $$ |A B|^{2}=|A D|^{2}+|D B|^{2}=\frac{1}{3}+\frac{1}{4}=\frac{7}{12} $$ which gives the answer $$ |A B|=\sqrt{\frac{7}{12}} \doteq 0.76376 $$ Problem 13. Agnieszka, Brunhilda, Cecilia and Doina drew numbers 3, 6, 9 and 12 without repetitions in some order. (No number was shared by two or more women.) We know that two of them always lie and two say the truth. They said the following: - Agnieszka: I got twice as much as Doina. - Brunhilda: I got three times as much as Doina. - Cecilia: I got four times as much as Doina. - Doina: I did not get the least. What is the product of the numbers that the two liars got? Result. 27 Solution. If Doina got 3, she would lie. Therefore, exactly one of the others would have to lie, which is not possible, since two ladies would have to have drawn the same number. If Doina got 9 or 12 , all others would lie, since it is not possible to draw any multiple thereof, thus Doina got 6 . The only one of the others who could tell the truth is Agnieszka. Thus she got 12. Therefore, the two liars are Brunhilda and Cecilia, who got 3 and 9 in some order. The product of their numbers is 27 . Problem 14. Find the smallest positive integer that has exactly 24 positive divisors and exactly 8 of them are odd. Result. 420 Solution. Recall that for any positive integer $n$ with factorization $n=p_{1}{ }^{a_{1}} \cdots p_{k}{ }^{a_{k}}$ such that the $p_{i}$ are distinct primes, the number of all positive divisors of $n$ is equal to $\left(a_{1}+1\right) \cdots\left(a_{k}+1\right)$. Obviously, the number of odd divisors can be found by just omitting all factors 2 in the prime decomposition of $n$. Because $24=8 \cdot 3$ and with the fact that the number of odd divisors has to be 8 , we get that the power of 2 must be 2 . Since $2 \cdot 2 \cdot 2=4 \cdot 2=8$, we have to consider either first powers of the three smallest prime numbers or the third power of the smallest one and the first power of the second smallest one or the 7 -th power of the smallest one. But $3 \cdot 5 \cdot 7<3^{3} \cdot 5<3^{7}$, so the smallest number $n$ is equal to $2^{2} \cdot 3 \cdot 5 \cdot 7=420$. Problem 15. A circle and a square have the same centre. If the grey regions have the same area, what is the ratio of the side of the square to the radius of the circle? ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-05.jpg?height=408&width=408&top_left_y=687&top_left_x=821) Result. $\quad \sqrt{\pi} \doteq 1.77246$ Solution. Since the grey regions have the same area, the circle and the square have the same area, because this area equals the area of the overlap plus the quadruple of the area of a single grey region. If $a$ denotes the side length of the square and $r$ the radius of the circle, we get $a^{2}=r^{2} \pi$ and therefore $a: r=\sqrt{\pi}$. Problem 16. Lenka wrote the sequence $1,2,3, \ldots, 20$ and a plus or minus sign between each pair of consecutive numbers in such a way that the resulting sum equalled 192. In how many ways could she have done that? Result. 5 Solution. Note that one will be positive, since minuses were put only in between the numbers. If all the signs are plus, the result is 210 . She got 18 less, so she had to place a minus sign in front of numbers with combined sum 9. These are one triplet (the smallest one) $(2,3,4)$, three pairs $(2,7),(3,6),(4,5)$ and the single number 9 . Thus we are left with five possibilities. Problem 17. Three squares have been put into an isosceles right triangle as in the picture: ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-05.jpg?height=463&width=916&top_left_y=1776&top_left_x=570) What fraction of the area of the triangle is taken by the cyan square? Result. $1 / 81$ Solution. The key observation is that the length of the side of the yellow square is one third of the base of the triangle; this can be easily seen by extending the "outer" triangles to squares. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-06.jpg?height=477&width=920&top_left_y=207&top_left_x=568) From this we conclude that the area ratio of the yellow square to the triangle is $$ 2 \cdot\left(\frac{\sqrt{2}}{3}\right)^{2}=\frac{4}{9} $$ Using the observation again, the side length of the cyan square is one sixth of that of the yellow square, hence their area ratio is $1 / 36$. We get the desired ratio by multiplying these two, obtaining $1 / 81$. Problem 18. Find the sum of all positive integers which cannot be written as $2 a+3 b$ for some coprime positive integers $a$ and $b$. Recall that positive integers $m$ and $n$ are coprime if $\operatorname{gcd}(m, n)=1$. Result. 26 Solution. We can easily see that we cannot get any of $1,2,3,4,6,10$, since we have $a, b \geq 1$ and $\operatorname{gcd}(a, b)=1$. On the other hand take the coprime couples $(a, b)$ of the form $(a, 1)$ to write all odd numbers $n \geq 5$, take $(2 k-3,2)$ to express all $n=4 k \geq 8$, and $(2 k-5,4)$ for numbers $n=4 k+2 \geq 14$. Therefore the desired sum is $1+2+3+4+6+10=26$. Problem 19. A polynomial is called heavy if it has two integer roots differing by one, all of its coefficients are integers and their sum equals 2020. How many heavy quadratic polynomials, i.e. expressions of the form $a x^{2}+b x+c$, are there? Result. 4 Solution. Since the polynomial has two roots, it can be represented as $c(x-a)(x-b)$, where $a, b$ are the integer roots and $c$ is the leading coefficient, thus being integer as well. The sum of the coefficients is easily computed as $c(a-1)(b-1)$. Since this equals $2020=2 \cdot 2 \cdot 5 \cdot 101$, and since $(a-1)$ and $(b-1)$ differ by one, we are left with four possibilities, namely $2020=1010 \cdot 1 \cdot 2,2020=1010 \cdot(-1) \cdot(-2), 2020=101 \cdot 4 \cdot 5$, and $2020=101 \cdot(-4) \cdot(-5)$. Problem 20. A train consisted of 40 carriages numbered from 1 to 40 , each having the capacity of 40 passengers. At the beginning, there was one passenger sitting in carriage 1 , two passengers in carriage 2 etc., up to forty passengers in carriage 40. However, for technical reasons, the last carriage had to be removed from the train and all its passengers moved to the carriages with smaller number in such a way that they took the first available seat and if the carriage was already full, they proceeded to check the next one with a smaller number. During the journey, the same thing happened subsequently to carriages $39,38, \ldots, 23$. How many passengers were in carriage 2 after this had happened? Result. 19 Solution. Note that there are altogether $40 \cdot 41 / 2=820$ passengers on the train. When the train consists of 22 carriages, its last 20 carriages have to be full, for otherwise there would have been only at most $1+2+39+19 \cdot 40=802$ passengers. This leaves 20 passengers to sit in the first two carriages and since the carriage 2 cannot be full, carriage 1 holds still only 1 passenger. It follows that there are 19 passengers in carriage 2 . Problem 21. Jacek cannot buy envelopes, so he is planning to make them by himself. To make a rectangular envelope Jacek is taking a square sheet of paper with diagonal $30 \mathrm{~cm}$, folds the left and the right corner, then folds the bottom corner and closes the envelope by folding the top corner. In order to glue the envelope correctly, there needs to be precisely $1 \mathrm{~cm}$ overlap, as in the picture, and after closing the envelope the top corner cannot be below the bottom edge of the envelope. What is the maximal possible width of the envelope? ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-07.jpg?height=414&width=899&top_left_y=216&top_left_x=584) Result. 18 Solution. Let the side lengths of the envelope be $a$ (the width) and $b$ (the height), and the diagonal of the square be equal to $d$. Looking at the triangles formed by the vertical folding lines (they are right angled and isosceles, so the length of the horizontal altitude equals half of the vertical hypotenuse), we observe that $d=b+a+2$. In order to fold properly, the inequality $\frac{d-b}{2} \leq b$, i.e. $b \geq \frac{d}{3}$ must hold. Together it gives $a \leq d-\frac{d}{3}-2=\frac{2}{3} d-2=18$. Problem 22. Martha picked three positive integers $a, b, c$ and computed the three sums of pairs $a+b, b+c, c+a$, obtaining three distinct squares of integers. What was the smallest possible value of $a+b+c$ ? Result. 55 Solution. Let $a+b=d^{2}, b+c=e^{2}, c+a=f^{2}$ for (necessarily distinct) positive integers $d, e, f$. WLOG $da+c=f^{2} $$ Moreover, the sought value equals $\left(d^{2}+e^{2}+f^{2}\right) / 2$. Hence we are looking for a triple of squares satisfying $(\Omega)$ and having its sum even and minimal at the same time. Such a triple is $\left(d^{2}, e^{2}, f^{2}\right)=(25,36,49)$ and the answer is 55 . Problem 23. In the following diagram, how many paths are there from point $A$ to point $B$ that use each arrow at most once? (One such path is drawn in violet.) ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-07.jpg?height=168&width=828&top_left_y=1555&top_left_x=617) Result. $\quad 162=2 \cdot 3^{4}$ Solution. The path is completely determined by the following choices: First go either up or down (2 options) and then for each of the 4 vertical pairs of nodes: either do not use any vertical arrow, or use one of them, or use both (3 options each). Hence the answer is $2 \cdot 3^{4}=2 \cdot 81=162$. Problem 24. How many four-digit numbers are there with the property that any two neighbouring digits differ exactly by 3? A number may not start with zero. Result. 29 Solution. We code the numbers in the following way: we write U if the right digit is bigger than the left one and D if the right digit is smaller than the left one, e.g. 1474 is encoded as UUD and 1414 UDU. There are eight possible codes in total and for each of them the corresponding number is determined by the first digit: | code | UUU | UUD | UDU | UDD | DUU | DUD | DDU | DDD | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | possible first digits | none | $1-3$ | $1-6$ | $3-6$ | $3-6$ | $3-9$ | $6-9$ | 9 | In total, there are $3+6+4+4+7+4+1=29$ sought numbers. Problem 25. Each of two circles of equal size touches the other circle and also two sides of a unit square as in the picture. Compute the side length of the dashed square, which shares one corner with the unit square and touches the circles. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-08.jpg?height=323&width=326&top_left_y=250&top_left_x=865) Result. $\frac{1}{1+\sqrt{2}}=\sqrt{2}-1 \doteq 0.41421$ Solution. Let $x$ be the side length of the small square. The radii $r$ of the circles are $\frac{1-x}{2}$. The diagonal of the unit square is divided by the centres of the circles and their point of tangency into four segments. Two of them are the radii and two of them are diagonals in squares of sides $r$. Altogether, we have $$ \sqrt{2}=2 r+2 \sqrt{2} r=(1-x)(1+\sqrt{2}) $$ and solving this equation gives $x=1-\frac{\sqrt{2}}{1+\sqrt{2}}=\frac{1}{1+\sqrt{2}}=\sqrt{2}-1$. Problem 26. Real numbers $x_{1}, x_{2}, \ldots, x_{2020}$ have these properties: - Whenever we sum all of the numbers except a single $x_{i}$ with $i$ odd, the result is 2 . - Whenever we sum all of the numbers except a single $x_{i}$ with $i$ even, the result is 0 . What is the value of the sum $x_{1}+x_{2}+\cdots+x_{2020}$ ? Result. $2020 / 2019$ Solution. If we sum all the given equations, we obtain $$ 2019\left(x_{1}+x_{2}+\cdots+x_{2020}\right)=1010 \cdot 2+1010 \cdot 0=2020 $$ so the sought result is $2020 / 2019$. Problem 27. Two players are playing a game, alternating moves. Each move consists of changing a positive integer $n$ into another positive integer in the range $\left[\frac{n}{3}, \frac{n}{2}\right]$. A player who cannot move loses. For how many starting numbers in the range $[1,1000]$ is the first player able to win with optimal strategy? Result. 620 Solution. Let us call winning the numbers for which there exists a strategy guaranteeing victory, and the rest of the numbers losing. Observe that a number $n$ is winning if and only if there is a losing number in the interval $\left[\frac{n}{3}, \frac{n}{2}\right]$; on the other hand, a number $n$ is losing if and only if every number from the interval $\left[\frac{n}{3}, \frac{n}{2}\right]$ is winning (which includes the option that there is actually no integer in that interval). Clearly, 1 is a losing number, so according to the rules above, 2 and 3 are winning. This in turn implies that the numbers $4, \ldots, 7$ are losing, since for each of these numbers we have $\left[\frac{n}{3}, \frac{n}{2}\right] \cap \mathbb{N} \subseteq\{2,3\}$. Next we get that $8, \ldots, 21$ are winning etc. Continuing in the fashion, we obtain additional winning numbers $44, \ldots, 129,260, \ldots, 777$. Altogether there are 620 winning numbers. Problem 28. Two circles with diameters $A B=17$ and $A C=7$ meet in points $A$ and $D$. We further know that $C D=4$. Consider all possible distances of the centres of the circles and compute their product. Result. 60 Solution. Thales theorem yields two right angles at the point $D$ so the points $B, C$ and $D$ lie on one line. From the Pythagorean theorem we compute $B D^{2}=17^{2}-\left(7^{2}-4^{2}\right)=16^{2}$ and thus $B C=16 \pm 4$ (indeed, the right angles can be either identical or form a straight line). Connecting the centres of the circles we obtain a similar (with ratio $\frac{1}{2}$ ) triangle with $A B C$ and thus the desired distance equals either $20 / 2=10$ or $12 / 2=6$ and the desired product is 60 . ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-09.jpg?height=928&width=1259&top_left_y=221&top_left_x=410) Problem 29. Seven trolleybuses run between fourteen stations on one line. Each trolleybus starts in one of the stations and moves in one direction until it reaches the end of the line, which is either the first or the last station on the line, where it turns around and continues in the other direction. All trolleybuses maintain constant speed and they pass exactly one station in a minute. MSc Birne has placed them in such a way, that 1. there is at most one trolleybus at each station, and 2. there will be at most one trolleybus at each station in one minute, no matter in what directions the trolleybuses go. In how many ways could that have been done? The trolleybuses are considered identical. Result. 20 Solution. The trolleybuses must not be in a distance of two stations. Obviously odd and even stations are independent and also obviously, both can accommodate at most 4 trolleybuses. Thus one has to accommodate 3 and the other 4 , so the solution is $2 \cdot N$, where $N$ is the number of ways in which 3 stones could be placed at seven places in a row such that they are separated by a free spaces. We first place the four free spaces in a line and then we place the three stones in between the free spaces. The first stone has 5 possibilities, the second 4 and the third 3 , since the stones are indistinguishable the result reads $N=(5 \cdot 4 \cdot 3) /(3 \cdot 2 \cdot 1)=10$. The final answer is therefore $2 \cdot 10=20$ Problem 30. Marian has written a book with 2020 pages labelled $1,2,3, \ldots 2020$. After revision, he added an abstract consisting of 11 pages in front of the book. How many digits does he have to rewrite so that every page gets its proper label? A digit from an old page number can only be used in the new one on the same position (ones, tens, hundreds, etc.) and newly written digits, such as the leading 1 appearing in the change $95 \rightarrow 106$, are not counted. Result. 4251 Solution. First, let us calculate how many digits will remain the same. It is easy to see that for every one or two digit number the operation +11 will not leave any digit intact. So every digit that will be intact has to be on position of hundreds or thousands. If the last two digits of a page are labelled from 00 to 88 , the first two digits will be intact. This is the case for the hundreds digit for 89 numbers in each range of hundred. In addition, for every number from 1000 to 1988 we have one more stable digit - the thousand digit. So, considering all numbers up to 1999, we have $19 \cdot 89+989=2680$ digits that remain the same. From 2000 to 2020 , there are 21 numbers that will not change their hundred or thousand digit which gives $2 \cdot 21=42$ stable digits. Hence $2680+42=2722$ digits remain the same. Now, how many digits are there in total? From 1 to 9 there are 9 digits. From 10 to 99 there are $90 \cdot 2$ digits. From 100 to 999 there are $900 \cdot 3$ digits and from 1000 to 2020 there are $1021 \cdot 4$ digits. So there are 6973 digits overall. Therefore, $6973-2722=4251$ digits have to be changed. Problem 31. A puck is dropped into the top of the plinko box and slides downward until it falls out the bottom. How many different paths through the box are possible? One example path is shown. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-10.jpg?height=376&width=443&top_left_y=246&top_left_x=812) Result. 65 Solution. We label each intersection point with the number of paths the puck can take from that point on. We start from the bottom of the box where there is only 1 path, and work our way up. Each number is the sum of the number or numbers immediately below it. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-10.jpg?height=739&width=857&top_left_y=864&top_left_x=605) Problem 32. The king and his 100 knights sit down at the round table. The vegetarians are served cheese and everyone else is served chicken. But the king has a smaller portion of chicken than the knight to his left, so he orders everyone to pass their plate to the right. Now the king has a reasonable portion of chicken, but 64 knights have the wrong meal, so everyone passes their plate to the right again. Once more the king has a smaller portion of chicken than the knight to his left, so everyone passes their plate to the right a third time. Now only 2 knights (and not the king) have the wrong meal, so they trade places and the feast begins. How many of the king's knights ate chicken? Result. 68 Solution. Notice that the king and the three knights to his left were all served chicken. So after the third pass, the first vegetarian meal to the king's left was passed to a meat-eater, and the first vegetarian to the king's right received meat. These are the two knights who had to trade places. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-10.jpg?height=114&width=753&top_left_y=2156&top_left_x=660) Everyone else was served the same dish as the person 3 places to their left, so the seating arrangement was ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-10.jpg?height=155&width=1204&top_left_y=2361&top_left_x=423) Then every vegetarian and every meat-eater to the right of a vegetarian had the wrong meal after the first pass. So there are $64 / 2=32$ vegetarians. The remaining $100-32=68$ knights (as well as the king) ate chicken. Problem 33. David would love to draw a triangle $A B C$ and points $D, E$ in the interiors of sides $A B$ and $B C$ respectively in such a way, that triangles $A B C, A E C, A D E, B D E$ were similar. What is the sum of all possible values of the size of angle $B A C$ in degrees? Result. 150 Solution. Let us denote the inner angles of triangle $A B C$ by $\alpha, \beta$ and $\gamma$, respectively, and note that the other three triangles have to have the same inner angles. Obviously $|\varangle E A C|=\beta$ and $|\varangle A E C|=\alpha$. Since the sizes of angles $E D A$ and $E D B$ add up to $180^{\circ}$, which is also the sum of $\alpha, \beta$ and $\gamma$, they have to be the same, that is, they are both right. Moreover, they cannot equal $\beta$ as that would mean that triangle $B D E$ would have two right inner angles, so they are equal either to $\alpha$ or to $\gamma$. Straightforward angle chasing gives a unique solution to both possibilities, see figure below. The first one trivially means $\alpha=90^{\circ}$, while the other implies $3 \alpha=180^{\circ}$, i.e. $\alpha=60^{\circ}$. The sum of all possibilities thus equals $90^{\circ}+60^{\circ}=150^{\circ}$. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-11.jpg?height=314&width=1008&top_left_y=642&top_left_x=523) Problem 34. Five night workers have to schedule their shifts for the following 10 nights so that every night exactly two workers have a shift and those two workers cannot have the shift night after. How many time schedules containing each possible pair of the workers exist? Result. 240 Solution. Let us draw the workers as nodes in a diagram, where a segment between two nodes represent the shift of the two workers. We are looking for the number of ways to draw all the $5 \cdot 4 / 2=10$ segments so that no two subsequent segments have a common node. The first segment can be chosen in 10 ways, the second in 3 ways and in the next two steps we always have two choices. However, no matter what choices we do, we get essentially the same situation, i.e. we can get any sequence of choices from any other by renumbering the nodes. The fifth choice may lead to two different outcomes: Either we obtain a cycle of five segments, or a cycle of four segments with a "tail". The former option leads to $1,2,1,1$, and 1 choices in the following steps, whereas the latter option cannot be completed in a valid way, since the final two segments would have to contain the "end of the tail". We conclude that there are $$ 10 \cdot 3 \cdot 2 \cdot 2 \cdot 2=240 $$ possible time schedules. Problem 35. Lucy has got a triangle with side lengths 32,50 , and $x$. Furthermore, there is a triangle similar to and having two sides of the same length as Lucy's, but it is not congruent to it. Find the sum of all possible values of $x$. Result. $27721 / 200$ Solution. Let $am+1 \quad \text { for some } m \in \mathbb{N} \text {, } $$ in other words $f(m)=m+c$ for some $c \in \mathbb{N}, c \geq 2$. Then $$ f(2 m) \geq f(m)+f(f(m))-1=m+c-1+f(m+c) \geq 2 m+2(c-1)+1 $$ and by applying this argument inductively we get $f\left(2^{r} m\right) \geq 2^{r} m+2^{r}(c-1)+1$. Combining this inequality, the one from statement and the fact that $f$ is non-decreasing, we obtain $$ f\left(2^{r} m+1\right) \geq f\left(f\left(2^{r} m\right)\right) \geq f\left(2^{r} m+2^{r}(c-1)+1\right) $$ so again by the monotonicity $f\left(2^{r} m+1\right)=f\left(2^{r} m+2\right)=\cdots=f\left(2^{r} m+2^{r}(c-1)+1\right)$. For all $k \in \mathbb{N}$ choose $r_{k} \in \mathbb{N}$ such that $2^{r_{k}}(c-1)>k$. Then $$ f\left(2^{r_{k}} m+1+k\right) \geq f\left(2^{r_{k}} m+1\right)+f(f(k))-1 \geq f\left(2^{r_{k}} m+1+k\right)+f(f(k))-1 $$ and hence $f(f(k)) \leq 1$ meaning $f(f(k))=1$ for all $k \in \mathbb{N}$. Hence also $1=f(f(m))=f(m+c) \geq f(m)$ and hence $f(m)=1$ contradicting the assumption (1). Hence indeed $f(n) \leq n+1$ for all $n \in \mathbb{N}$. In fact, for a given positive integer $N>1$, the value $f(N)$ can be any element of the set $\{1,2, \ldots, N+1\}$. To see this, let first $AA$. The function $f_{1}$ satisfies the condition and $f_{1}(N)=A$. Secondly, the function $f_{2}(n)=n$ also satisfies the condition and $f_{2}(N)=N$. Lastly, the function $f_{3}(n)=N\left\lfloor\frac{n}{N}\right\rfloor+1$ gives $f_{3}(N)=N+1$ and it also satisfies the condition. Indeed, we have $$ f_{3}(m)+f_{3}\left(f_{3}(n)\right)=N\left(\left\lfloor\frac{m}{N}\right\rfloor+\left\lfloor\left\lfloor\frac{n}{N}\right\rfloor+\frac{1}{N}\right\rfloor\right)+2 \leq N\left(\left\lfloor\frac{m}{N}\right\rfloor+\left\lfloor\frac{n}{N}\right\rfloor\right)+2 \leq N\left\lfloor\frac{m+n}{N}\right\rfloor+2=f_{3}(m+n)+1 $$ where we used that $\left\lfloor\frac{n}{N}\right\rfloor+\frac{1}{N}<\left\lfloor\frac{n}{N}\right\rfloor+1$ for $N>1$ and that $\lfloor x\rfloor+\lfloor y\rfloor \leq\lfloor x+y\rfloor$ for any real numbers $x, y \in(0, \infty)$. Since $2020>1$, the result is simply the average of all the positive integers from 1 to 2021, i.e. $\frac{2022}{2}=1011$. Problem 45. Farmer Karl possesses a quadrangular piece of land with the side lengths $a=40, b=20, c=28, d=32$ as in the picture. By heritage he receives the two triangular pieces of land $B E C$ and $D C F$, which are delimited by the original sides of his land and their extensions, respectively. If he needs a fence of length 80 for the section $B E+E C$, how long is the fence for the section $C F+F D$ ? ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-16.jpg?height=779&width=1008&top_left_y=336&top_left_x=524) Result. 88 Solution. First of all, we show that the triangles $\triangle B E C, \triangle A E D, \triangle D C F$ and $\triangle A B F$ have an identical excircle lying in the angle $E A F$. ![](https://cdn.mathpix.com/cropped/2024_06_04_bd81a44a9d77dd3fb36bg-16.jpg?height=796&width=763&top_left_y=1281&top_left_x=652) Let $G$ denote the tangent point of the $B$-excircle of triangle $\triangle B E C$ lying on $A B$. The distance between $B$ and $G$ is half the perimeter of the triangle, i.e. $B G=\frac{1}{2}(C B+B E+E C)$. Now let $G^{\prime}$ be the tangent point of the $A$-excircle of triangle $\triangle A E D$ lying on $A B$. Using $a+b=60=c+d$ we get $$ \begin{aligned} A G^{\prime} & =\frac{1}{2}(A E+E D+D A) \\ & =\frac{1}{2}(A B+B E+E C+C D+D A) \\ & =\frac{1}{2}(A B+B E+E C+A B+B C) \\ & =A B+\frac{1}{2}(B E+E C+B C) \end{aligned} $$ and hence $G=G^{\prime}$. Therefore, the tangent point $O$ on side $C E$ is uniquely determined for both triangles and it follows that the triangles $\triangle B E C$ and $\triangle A E D$ have an identical excircle. By analogy, we can show that the triangles $\triangle D C F$ and $\triangle A B F$ have also the same excircle. It is even identical for all four triangles under consideration since the center point of the excircle has to lie on the angular bisector of $\angle E A F$ and on the angular bisector of $\angle E C F$. Since the tangents to a circle have equal lengths, from $A G=A H$ we get that the triangles $\triangle A E D$ and $\triangle A B F$ have perimeters of equal lengths. Hence we obtain $$ \begin{aligned} C F+F D & =A B+B F+F A-A B-B C-D A \\ & =A E+E D+D A-A B-B C-D A \\ & =B E+E C+C D-B C \\ & =80+28-20=88 \end{aligned} $$ as the length of $C F+F D$. Problem 46. Determine for how many $k \in\{1, \ldots, 2020\}$ the equation $p^{3}+q^{3}+r^{3}=3 p q r+k$ has a solution $(p, q, r)$ for some positive integers $p, q, r$. Result. 1568 Solution. Let us write the equation in the form $$ p^{3}+q^{3}+r^{3}-3 p q r=\frac{1}{2}(p+q+r)\left((p-q)^{2}+(q-r)^{2}+(r-p)^{2}\right)=k $$ Note that if the last bracket is nonzero, then it equals at least two and the numbers $p, q, r$ cannot be all equal. Hence $k \geq(1+1+2) \cdot \frac{1}{2} \cdot 2 \geq 4$. The triple $(p, q, r)=(n, n, n+1)$ is a solution for $k=3 n+1$ for any $n \geq 1$. Similarly, the triple $(p, q, r)=(n, n+1, n+1)$ is a solution for $k=3 n+2$ for any $n \geq 1$. If $3 \mid k$ then by rewriting the equation as $$ k=p^{3}+q^{3}+r^{3}-3 p q r=(p+q+r)^{3}-3(p+q+r)(p q+q r+r p) $$ we see that also $3 \mid p+q+r$ and thus necessarily $9 \mid k$. On the other hand, the triple $(p, q, r)=(n-1, n, n+1)$ solves the equation with $k=9 n$ for any $n \geq 2$. It only remains to investigate the case $k=9$ If the positive integers $p, q, r$ are pairwise different, we have $k=\frac{1}{2}(p+q+r)\left((p-q)^{2}+(q-r)^{2}+(r-p)^{2}\right) \geq(1+2+3) \frac{1}{2}(1+1+4)=18$ and if $p=q \neq r$ we have $9=(2 p+r)(p-r)^{2}$ and since $2 p+r>1$ we must have $2 p+r=9$ and $|p-r|=1$ which is impossible as then $r=p \pm 1$ and $9 \neq 3 p \pm 1$. In conclusion, all the admissible $k \in\{1, \ldots, 2020\}$ can be obtained by removing from the set the numbers smaller than 4 and multiples of 3 and then adding the multiples of 9 larger than 9 . Hence the result is $2020-3-672+223=1568$. [^0]: ${ }^{1}$ these sizes can be expressed using Euler's totient function as $\varphi(40 / d)$.