2018 Fermat Solution
2018 Fermat Solution
Solutions
1. Evaluating,
2016 − 2017 + 2018 − 2019 + 2020 = 2016 + (2018 − 2017) + (2020 − 2019)
= 2016 + 1 + 1
= 2018
Answer: (D)
2. Since the maximum temperature was 14◦ C and the minimum temperature was −11◦ C, then
the range of temperatures was 14◦ C − (−11◦ C) = 25◦ C.
Answer: (B)
3. The expression (3x + 2y) − (3x − 2y) is equal to 3x + 2y − 3x + 2y which equals 4y.
When x = −2 and y = −1, this equals 4(−1) or −4.
Answer: (A)
6. Since ∠QRT = 158◦ , then ∠QRP = 180◦ − ∠QRT = 180◦ − 158◦ = 22◦ .
Since ∠P RS = ∠QRS and ∠QRP = ∠P RS +∠QRS, then ∠QRS = 12 ∠QRP = 12 (22◦ ) = 11◦ .
Since 4QSR is right-angled at Q, then ∠QSR = 180◦ − 90◦ − ∠QRS = 90◦ − 11◦ = 79◦ .
Answer: (E)
7. Since Bev has driven 312 km and still has 858 km left to drive, the distance from Waterloo to
Marathon is 312 km + 858 km = 1170 km.
The halfway point of the drive is 12 (1170 km) = 585 km from Waterloo.
To reach this point, she still needs to drive 585 km − 312 km = 273 km.
Answer: (B)
8. A line segment joining two points is parallel to the x-axis exactly when the y-coordinates of
the two points are equal.
Here, this means that 2k + 1 = 4k − 5 and so 6 = 2k or k = 3.
(We can check that when k = 3, the coordinates of the points are (3, 7) and (8, 7).)
Answer: (A)
2018 Fermat Contest Solutions Page 3
180
9. Since the area of rectangle P QRS is 180 and SR = 15, then P S = = 12.
15
Since P S = 12 and U S = 4, then P U = P S − U S = 12 − 4 = 8.
Since 4P U T is right-angled at U , then by the Pythagorean Theorem,
√ √ √
T U = P T 2 − P U 2 = 102 − 82 = 36 = 6
since T U > 0.
In 4P T S, we can consider base P S and height T U .
Therefore, its area is 12 (P S)(T U ) = 12 (12)(6) = 36.
Answer: (B)
11. Since 56 of the balls are white and the remainder of the balls are red, then 61 of the balls are red.
Since the 8 red balls represent 16 of the total number of balls and 56 = 5 · 16 , then the number of
white balls is 5 · 8 = 40.
Answer: (C)
12. There is 1 square that is 1 × 1 that contains the shaded square (namely, the square itself).
There are 4 squares of each of the sizes 2 × 2, 3 × 3 and 4 × 4 that contain the shaded square.
Finally, there is 1 square that is 5 × 5 that contains the shaded square (namely, the 5 × 5 grid
itself).
In total, there are thus 1 + 4 + 4 + 4 + 1 = 14 squares that contain the shaded 1 × 1 square.
Answer: (E)
13. We would like to find the first time after 4:56 where the digits are consecutive digits in increasing
order.
It would make sense to try 5:67, but this is not a valid time.
Similarly, the time cannot start with 6, 7, 8 or 9.
No time starting with 10 or 11 starts with consecutive increasing digits.
Starting with 12, we obtain the time 12:34. This is the first such time.
We need to determine the length of time between 4:56 and 12:34.
From 4:56 to 11:56 is 7 hours, or 7 × 60 = 420 minutes.
From 11:56 to 12:00 is 4 minutes.
From 12:00 to 12:34 is 34 minutes.
Therefore, from 4:56 to 12:34 is 420 + 4 + 34 = 458 minutes.
Answer: (A)
2018 Fermat Contest Solutions Page 4
14. The line with equation y = x has slope 1 and passes through (0, 0).
When this line is translated, its slope does not change.
When this line is translated 3 units to the right and 2 units down, every point on the line is
translated 3 units to the right and 2 units down. Thus, the point (0, 0) moves to (3, −2).
Therefore, the new line has slope 1 and passes through (3, −2).
Thus, its equation is y − (−2) = 1(x − 3) or y + 2 = x − 3 or y = x − 5.
The y-intercept of this line is −5.
Answer: (C)
15. Each entry in the grid must be a divisor of the product of the numbers in its row and the
product of the numbers in its column.
56
135
N 48
21 108 160
Only two of the products are multiples of 5, namely 160 and 135.
This means that the 5 must go in the second row and third column.
135
From this, we can see that the product of the other two numbers in the second row is = 27.
5
Since all of the entries are between 1 and 9, then the remaining two numbers in this row must
be 3 and 9.
Since 9 is not a divisor of 21, then 9 must be in the middle column.
108
This means that the product of the remaining numbers in the middle column is = 12.
9
This means that the remaining digits in the middle column are 3 and 4, or 2 and 6. (These are
the only factor pairs of 12 from the list of possible entries.)
Since 3 already occurs in the second row, then the entries in the second column must be 2 and 6.
Since 6 is not a divisor of 56, then 6 cannot go in the first row.
This means that 6 goes in the third row and so N = 6.
We can complete the grid as follows:
7 2 4 56
3 9 5 135
1 6 8 48
21 108 160
Answer: (D)
2018 Fermat Contest Solutions Page 5
16. Solution 1
If point R is placed so that P Q = QR = P R, then the resulting 4P QR is equilateral.
Since points P and Q are fixed, then there are two possible equilateral triangles with P Q as a
side – one on each side of P Q.
R1
P Q
R2
One way to see this is to recognize that there are two possible lines through P that make an
angle of 60◦ with P Q.
Solution 2
Consider the line segment P Q. Draw a circle with centre P that passes through Q and a circle
with centre Q that passes through P .
R1
P Q
R2
17. The side length of the square is 2 and M and N are midpoints of sides.
Thus, SM = M R = QN = N R = 1. √ √ √
Using the Pythagorean Theorem in 4P SM , we get P M = P S 2 + SM 2 = 22 + 12 = 5
since P M > 0. √
Similarly, P N = 5. √ √ √
Using the Pythagorean Theorem in 4M N R, we get M N = M R2 + N R2 = 12 + 12 = 2
since M N > 0.
Using the cosine law in 4P M N , we get
19. Solution 1
Over the first 3 minutes of the race, Peter ran 48 m farther than Radford. Here is why:
Over these 4 minutes, he runs (4 min) · (16 m/min) = 64 m farther than Radford.
After 3 minutes, Peter was 18 m ahead of Radford.
Therefore, after 7 minutes, Peter is 18 m + 64 m = 82 m farther ahead than Radford, and so
Radford is 82 m from the finish line.
Solution 2
As in Solution 1, suppose that Radford ran d m over the first 3 minutes and so Peter runs
(d + 48) m over these first 3 minutes.
Since Peter’s speed is constant, he runs 43 (d + 48) m over the next 4 minutes.
Since Radford’s speed is constant, he runs 43 d over these next 4 minutes.
This means that Peter runs a total of (d + 48) m + 34 (d + 48) m = 73 (d + 48) m.
Also, Radford is (30 + d + 34 d) m from the start after 7 minutes, since he had a 30 m head start.
Thus, Radford’s distance from the finish line, in metres, is
7
3
(d + 48) − (30 + d + 43 d) = 73 d + 112 − 30 − d − 43 d = 82
Answer: (D)
When x = 1, we have x − 2 = −1 and so all 1009 factors are negative, making (∗) negative.
When x = 3, we have x − 2 = 1, x − 4 = −1 and all of the other factors are negative, giving
1008 negative factors and so a positive product.
When x = 5, we have x − 2 = 3, x − 4 = 1 and x − 6 = −1 and all of the other factors are
negative, giving 1007 negative factors and so a negative product.
This pattern continues giving a negative value for (∗) for x = 1, 5, 9, 13, . . . , 2013, 2017.
There are 1 + 2017−1
4
= 505 such values (starting at 1, these occur every 4 integers).
When x ≥ 2019, each factor is positive and so (∗) is positive.
Therefore, there are 1009 + 505 = 1514 positive integers x for which the product (∗) is less than
or equal to 0.
We should further justify the pattern that we found above.
Suppose that x = 4n + 1 for n = 0, 1, 2, . . . , 504. (These are the integers 1, 5, 9, 13, . . . , 2017.)
Then (∗) becomes
The 2kth factor is (n − (4k − 1)) and so when n = 4k, this factor is positive and the next factor
is negative.
In other words, when n = 2k, the first 2k of these factors are positive and the remaining factors
2018 Fermat Contest Solutions Page 8
are negative.
In other words, when n = 2k, there is an even number of positive factors.
Since the total number of factors is 1009, which is odd, then the number of negative factors is
odd and so the product is negative.
In a similar way, we can show that if x = 4n + 3 for n = 0, 1, 2, . . . , 503 (these are the integers
3, 7, 11, . . . , 2011, 2015), then the product is positive.
This confirms that this pattern continues.
Answer: (C)
a4 = a3 − a2 + 1 = y − (x + y − 1) + 1 = 2 − x
a5 = a4 − a3 + 1 = (2 − x) − y + 1 = 3 − x − y
a6 = a5 − a4 + 1 = (3 − x − y) − (2 − x) + 1 = 2 − y
a7 = a6 − a5 + 1 = (2 − y) − (3 − x − y) + 1 = x
a8 = a7 − a6 + 1 = x − (2 − y) + 1 = x + y − 1
Since a7 = a1 and a8 = a2 and each term in the sequence depends only on the previous two
terms, then the sequence repeats each 6 terms.
(For example, a9 = a8 − a7 + 1 = a2 − a1 + 1 = a3 and so on.)
Now
a1 + a2 + a3 + a4 + a5 + a6 = x + (x + y − 1) + y + (2 − x) + (3 − x − y) + (2 − y) = 6
which means that the sum of each successive group of 6 terms is also equal to 6.
We note that 2016 = 6 · 336 and so the 2016th term is the end of a group of 6 terms, which
means that the sum of the first 2016 terms in the sequence is 6 · 336 = 2016.
Finally, a2017 = a1 = x and a2018 = a2 = x + y − 1.
Thus, the sum of the first 2018 terms is 2016 + x + (x + y − 1) = 2x + y + 2015.
Answer: (E)
22. First, we find the coordinates of the points P and Q in terms of k by finding the points of
intersection of the graphs with equations y = x2 and y = 3kx + 4k 2 .
Equating values of y, we obtain x2 = 3kx + 4k 2 or x2 − 3kx − 4k 2 = 0.
We rewrite the left side as x2 − 4kx + kx + (−4k)(k) = 0 which allows us to factor and obtain
(x − 4k)(x + k) = 0 and so x = 4k or x = −k.
Since k > 0, P is in the second quadrant and Q is in the first quadrant, then P has x-coordinate
−k (which is negative).
Since P lies on y = x2 , then its y-coordinate is (−k)2 = k 2 and so the coordinates of P are
(−k, k 2 ).
Since Q lies on y = x2 and has x-coordinate 4k, then its y-coordinate is (4k)2 = 16k 2 and so
the coordinates of Q are (4k, 16k 2 ).
Our next step is to determine the area of 4OP Q in terms of k.
Since the area of 4OP Q is numerically equal to 80, this will give us an equation for k which
will allow us to find the slope of the line.
To find the area of 4OP Q in terms of k, we drop perpendiculars from P and Q to S and T ,
respectively, on the x-axis.
2018 Fermat Contest Solutions Page 9
y
P
x
S O T
The area of 4OP Q is equal to the area of trapezoid P ST Q minus the areas of 4P SO and
4QT O.
Trapezoid P ST Q has parallel bases SP and T Q and perpendicular height ST .
Since the coordinates of P are (−k, k 2 ), then SP = k 2 .
Since the coordinates of Q are (4k, 16k 2 ), then T Q = 16k 2 .
Also, ST = 4k − (−k) = 5k.
Thus, the area of trapezoid P ST Q is 21 (SP + T Q)(ST ) = 12 (k 2 + 16k 2 )(5k) = 85
2
k3.
4P SO is right-angled at S and so has area 21 (SP )(SO) = 12 (k 2 )(0 − (−k)) = 12 k 3 .
4QT O is right-angled at T and so has area 21 (T Q)(T O) = 12 (16k 2 )(4k − 0) = 32k 3 .
Combining these, the area of 4P OQ equals 85 2
k 3 − 21 k 3 − 32k 3 = 10k 3 .
Since this area equals 80, then 10k 3 = 80 or k 3 = 8 and so k = 2.
This means that the slope of the line is 3k which equals 6.
Answer: (D)
23. We are told that (x − a)(x − 6) + 3 = (x + b)(x + c) for all real numbers x.
In particular, this equation holds when x = 6.
Substituting x = 6 gives (6 − a)(6 − 6) + 3 = (6 + b)(6 + c) or 3 = (6 + b)(6 + c).
Since b and c are integers, then 6 + b and 6 + c are integers, which means that 6 + b is a divisor
of 3.
Therefore, the possible values of 6 + b are 3, 1, −1, −3.
These yield values for b of −3, −5, −7, −9.
We need to confirm that each of these values for b gives integer values for a and c.
If b = −3, then 6 + b = 3. The equation 3 = (6 + b)(6 + c) tells us that 6 + c = 1 and so c = −5.
When b = −3 and c = −5, the original equation becomes (x − a)(x − 6) + 3 = (x − 3)(x − 5).
Expanding the right side gives (x−a)(x−6)+3 = x2 −8x+15 and so (x−a)(x−6) = x2 −8x+12.
The quadratic x2 − 8x + 12 factors as (x − 2)(x − 6) and so a = 2 and this equation is an identity
that is true for all real numbers x.
Similarly, if b = −5, then c = −3 and a = 2. (This is because b and c are interchangeable in
the original equation.)
Also, if b = −7, then c = −9 and we can check that a = 10.
Similarly, if b = −9, then c = −7 and a = 10.
Therefore, the possible values of b are b = −3, −5, −7, −9.
The sum of these values is (−3) + (−5) + (−7) + (−9) = −24.
Answer: (B)
2018 Fermat Contest Solutions Page 10
24. We use the notation “a/b/c” to mean a pucks in one bucket, b pucks in a second bucket, and c
pucks in the third bucket, ignoring the order of the buckets.
Yellow buckets
1/0/0: With 1 puck to distribute, the distribution will always be 1/0/0.
Blue buckets
Since there are 2 pucks to distribute amongst the three buckets, then there is a total of 32 = 9
ways of doing this. (There are 3 possibilities for each of 2 pucks.)
2/0/0: There are 3 ways in which the 2 pucks end up in the same bucket (1 way for each of
the 3 buckets). The probability of this is 39 .
1/1/0: Thus, there are 9 − 3 = 6 ways in which the 2 pucks are distributed with 1 puck in each
of two buckets and 0 pucks in the third bucket. The probability of this is 69 .
Red buckets
With 3 pucks to distribute amongst 3 buckets, there is a total of 33 = 27 ways.
3/0/0: There are 3 ways in which the 3 pucks end up in the same bucket (1 way for each of
3
the 3 buckets). The probability of this is 27 .
1/1/1: There are 3 · 2 · 1 = 6 ways in which the 3 pucks end up with one in each bucket (3
choices of bucket for the first puck, 2 for the second, and 1 for the third). The probability of
6
this is 27 .
2/1/0: Thus, there are 27 − 3 − 6 = 18 ways in which the 2 pucks are distributed with 2 pucks
18
in 1 bucket, 1 puck in 1 bucket, and 0 pucks in 1 bucket. The probability of this is 27 .
Green buckets
With 4 pucks to distribute amongst 3 buckets, there is a total of 34 = 81 ways.
4/0/0: There are 3 ways in which the 4 pucks end up in the same bucket (1 way for each of
3
the 3 buckets). The probability of this is 81 .
3/1/0: There are 4 × 3 × 2 = 24 ways in which the pucks end up with 3 in one bucket and 1 in
another (4 ways to choose a puck to be on its own, 3 ways to choose the bucket for this puck,
and 2 ways to choose the bucket for the 3 pucks). The probability of this is 24
81
.
2/1/1: There are 6 ways of choosing two of the four pucks. (If they are labelled W, X, Y, Z,
then we can choose WX, WY, WZ, XY, XZ, or YZ.) There are 6 × 3 × 2 = 36 ways in which
the pucks can be distributed with 2 pucks in one bucket and 1 puck in each of the remaining
buckets (6 ways to choose the 2 pucks that go together, 3 ways to choose the bucket, and 2 ways
in which the remaining 2 pucks can be assigned to the remaining 2 buckets). The probability
of this is 36
81
.
2/2/0: Thus, there are 81 − 3 − 24 − 36 = 18 ways in which the 4 pucks are distributed with 2
pucks in each of 2 buckets. The probability of this is 18
81
.
For a green bucket to contain more pucks than each of the other 11 buckets, the following
possible distributions exist with probabilities as shown:
Green Red Blue Yellow Probability
3 3
4/0/0 (p = 81
) Any (p = 1) Any (p = 1) Any (p = 1) 81
24 3 24 24
3/1/0 (p = 81
) Any but 3/0/0 (p = 1 − 27
) Any (p = 1) Any (p = 1) ·
81 27
36 6
2/1/1 (p = 81
) 1/1/1 (p = 27 ) 1/1/0 (p = 96 ) Any (p = 1) 36
· 6 ·6
81 27 9
A 2/2/0 distribution of pucks among green buckets cannot satisfy the desired conditions because
there would be not be a single green bucket with more pucks in it than any other bucket, as
there would be two green buckets containing the same number of pucks.
3
Therefore, the overall probability is 81 + 24 · 24 + 81
81 27
36 6 6 1
· 27 · 9 = 27 8 8
+ 27 · 9 + 49 · 29 · 23 = 243
9 64
+ 243 16
+ 243 89
= 243 .
Answer: (B)
2018 Fermat Contest Solutions Page 11
| ·{z
D(k) = DD · · DD} = D · 11 · · 11} = D · 19 · 99
| ·{z · · 99} = D · 19 · (100
| ·{z · · 00} −1) = D · 19 · (10k − 1)
| ·{z
k times k times k times k times
P = 6: Here, 11P = 66 which is close to the square 64. We obtain (R, Q) = (8, 2).
P = 7: There are no perfect squares between 68 and 76, inclusive.
P = 8: Here, 11P = 88 which is close to the square 81. We obtain (R, Q) = (9, 7).
P = 9: There are no perfect squares between 90 and 98, inclusive.
Since k = 1 in each of these cases, we obtain an additional 8 quadruples.
Case 3: k = 2
Here, the equation 9P − 9Q + R2 = 10k (R2 − 9P ) becomes 9P − 9Q + R2 = 100R2 − 900P or
909P = 99R2 + 9Q or 101P = 11R2 + Q.
As P ranges from 1 to 9, the possible values of 101P are 101, 202, 303, 404, 505, 606, 707, 808, 909.
As R ranges from 1 to 9, the possible values of 11R2 are 11, 44, 99, 176, 275, 396, 539, 704, 891.
The pairs of integers in the first and second lists that differ by at most 9 are