You are here:

Basic Math/Locker problem

Advertisement


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.


Basic Math

All Answers


Answers by Expert:


Ask Experts

Volunteer


Lynn Houston

Expertise

I can answer questions in basic algebra and any grade school math.

Experience

Love math, currently helping my nephew get through Intermediate Algebra.

Education/Credentials
I majored in Math Ed in college (but decided not to teach), so have over 40 credits of math.

©2016 About.com. All rights reserved.