Lockers

There are 1000 lockers in a hallway, and 1000 students. All of the lockers in the hallway are closed. The first students runs down the hallway and opens every single locker. The second student runs down the hallway and closes every other locker, starting at the second locker (2,4,6,8,etc). The third student runs down the hallways and inverts every third locker (if a locker is closed, the third student opens it, if a locker is open, it gets closed). How many lockers are open after the 1000th student finishes running down the hallway.


The answer is 31.

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.

1 solution

Rohin Juneja
Dec 6, 2015

Let's start by making the problem simple. Write down the graph for the first ten students. O = open, c=closed

1       2      3      4      5     6     7     8     9     10

1 O O O O O O O O O O 2 O C O C O C O C O C 3 O C C C O O O C C C 4 O C C C O O O O C C

Until we get to... 10 O C C O C C C C O C

All of the open lockers are perfect squares. From this we can conclude that every open locker is a perfect square number. Since there are 31 squares from 1 to 1000, 31 is the correct answer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...