140 people walk down a hallway with 200 doors that are initially closed. The 1st person opens every door, the second person closes every second door, the third person operates on every third door; that is, if a door is open, the third person closes it, and if a door is closed, the third person opens it. The fourth person operates on every fourth door and so on. How many doors remain open?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Each door that is open will have an odd number of operations on it. For the numbers below 140 (inclusive), they must have an odd number of factors, so they must be perfect squares. There are 11 perfect squares under 140. For the numbers above 140 (exclusive), the perfect squares "lose" 1 factor (themselves) so they are closed now. The numbers that are not perfect squares also "lose" 1 factor (again, themselves) so they are now open. There are 60 numbers above 140 (exclusive) and 3 of them are perfect squares, so that leaves 57 open. So there are 11 + 57 = 68 open doors.