Reasoning · Grade 2-2 Conditions and Numbers

Problem

Count digits used over a range

Forty lockers all start closed. Liam opens every odd-numbered one, then Mia flips every locker whose number contains a 3. Flipping closes an open locker and opens a closed one. Find how many are open at the end.
Your answer
How to solve
Strategy Make a Systematic List — I track the state by Making a Systematic List of which lockers get opened and which get toggled. I break the work into Subproblems: first count how many are open after Liam, then adjust for Mia's toggles. The key is to separate Mia's targets into those already open (odd) versus closed (even), since toggling does opposite things to each.
1STEP 1

After Liam: count the open lockers

The odd numbers 1 to 39 are 20, so 20 open first.

1, 3, 5, …, 39 → 20 open
2STEP 2

List the lockers Mia touches (digit 3)

Numbers with a 3 are 3, 13, 23 and the thirties: 13.

{3, 13, 23} ∪ {30, 31, …, 39} → 3 + 10 = 13 lockers
3STEP 3

Split Mia's 13 lockers into odd (open) and even (closed)

Of those, 8 odd ones close and 5 even ones open.

odd & has 3: 8, even & has 3: 5, 8 + 5 = 13
4STEP 4

Adjust the open count

So 20 − 8 + 5 = 17 stay open.

20 - 8 + 5 = 17
Answer
17 lockers
20 − 8 + 5 = 17
Double-check by listing the open lockers directly: odd lockers that DON'T contain a 3 stay open (1, 5, 7, 9, 11, 15, 17, 19, 21, 25, 27, 29 = 12 of them) plus the even lockers Mia opened (30, 32, 34, 36, 38 = 5). That is 12 + 5 = 17, matching. The answer is between 0 and 40 and close to 20, which makes sense since Mia only changed 13 lockers.
Takeaway

Don't redraw all 40 doors — just notice Mia's flip closes the 8 open ones with a 3 and opens the 5 closed ones with a 3, so 20 − 8 + 5 = 17!

  • After Liam: count the open lockers
  • List the lockers Mia touches (digit 3)
  • Split Mia's 13 lockers into odd (open) and even (closed)
  • Adjust the open count