Basic Math/Locker problem
Jason wrote at 2012-10-13 00:18:34
This puzzle is great - it really makes you think!
I read an even more detailed answer here as well:http://www.programmerinterview.com/index.php/puzzles/lockers-puzzle/
John F wrote at 2014-12-08 17:03:45
Good explanation of reasoning, but the answer is incorrect for *this* question. The response assumes the initial state of the lockers is open, yet the problem clearly states they are initially shut. Honest mistake, I'm sure. The first student then opens all of them including our first perfect square, locker number one, which will be left open, never to be touched again.
The correct answer is that all of the lockers will be closed, except those that are perfect squares.