Prepare for your Next Interview
This is a discussion on Lockers... within the Aptitude Skills forums, part of the Brain Gym category; There are 1000 lockers in a high school with 1000 students. The problem begins with the first student opening all 1000 lockers; next the second student closes lockers 2,4,...
|
|||
|
Lockers...
There are 1000 lockers in a high school with 1000 students. The
problem begins with the first student opening all 1000 lockers; next the second student closes lockers 2,4,6,8,10 and so on to locker 1000; the third student changes the state (opens lockers closed, closes lockers open) on lockers 3,6,9,12,15 and so on; the fourth student changes the state of lockers 4,8,12,16 and so on. This goes on until every student has had a turn. How many lockers will be open at the end? What is the formula?
__________________
Cheers, :) James:) |
| Sponsored Links |
|
|||
|
Re: Lockers...
For example the 18th locker will be visited by those students whose numbers are factors of 18. i.e. by numbers 1,2,3,6,9,18. This is 6 students (an even number) and this means the locker will in turn be
open/closed/open/closed/open/closed. Now all numbers with an even number of factors will end up closed. And all numbers EXCEPT PERFECT SQUARES have an even number of factors if we include 1 and the number itself. For a perfect square, say 16, we have factors 1,2,4,8,16, an odd number, and the lockers would be open/closed/open/closed/open. So perfect squares always have an odd number of factors, and all other numbers have an even number of factors. Lockers that are open are 1, 4, 9, 16, 25, 36, ..... So total number of lockers that are open is 31. -------------------- suresh |
| The Following User Says Thank You to psuresh1982 For This Useful Post: | ||
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How many lockers are then opened? | debleena23 | Brainteasers | 2 | 05-09-2007 01:51 AM |