Popular Mechanics (South Africa)
The locker prank
DIFFICULTY Moderate by Laura Feiveson
There are 100 lockers that line the main hallway of Chelm High School. Every night, the school principal makes sure that all the lockers are closed so that there will be an orderly start to the next day. One day, 100 mischievous students decide that they will play a prank.
The students all meet before school starts, and line up. The first student then walks down the hallway and opens every locker. The next student follows by closing every other locker (starting at the second locker). Student three then goes to every third locker (starting with the third) and opens it if it’s closed, and closes it if it’s open. Student four follows by opening every fourth locker if it’s closed and closing it if it’s open. This continues until student 100 finally goes to the hundredth locker. When the principal arrives later in the morning, which lockers does she find open?