But unnecessarily cumbersome calculation.
What you refer to as a simplification of looking at, e.g 10-10 and 11-11 is really just looking at the first 10 or 11 lockers in the bigger problem (since none of the rest of the students will touch those lockers).
Looking at the first 25 lockers, which ones were left open? That will give you a hypothesis for the lockers that will be left open, and the fact that it gives you the answer of 31 is confirmation. But without the confirmation of getting the right answer, can you say why it works?