Problem 17 · 2017 Math Kangaroo
Hard
Number Theory
perfect-squarecareful-counting
Julia has 2017 round discs available: 1009 black ones and 1008 white ones. Using them, she wants to lay the biggest square pattern possible (as shown) and starts by using a black disc in the upper-left corner. She then lays the discs so that the colours alternate in each row and column. How many discs are left over when she has laid the biggest possible square?

Show answer
Answer: E — 40 white and 41 black
Show hints
Hint 1 of 2
A checkerboard square with a black corner has roughly half discs of each colour; find the biggest size that fits the supply.
Still stuck? Show hint 2 →
Hint 2 of 2
Try square sizes n x n and find the largest where black <= 1009 and white <= 1008, then count what is left.
Show solution
Approach: find the largest fitting checkerboard, then subtract
- For an n x n board starting black, with n even there are n^2/2 of each colour.
- n = 44 needs 968 black and 968 white, which fits; n = 46 needs 1058 each, too many.
- Leftover: 1009 - 968 = 41 black and 1008 - 968 = 40 white.
- So 40 white and 41 black are left over.
Mark:
· log in to save