How many lockers are then opened?
In a boarding school the students go into the locker room and stand by their closed lockers. At the first blow of a whistle, the students open every locker. At the second whistle, the students close every second locker (lockers 2,4,6 etc. are slammed shut). At the third whistle, the students toggle every third locker. To toggle means to close it if it's open, and to open it if it's close. They toggle lockers 3,6,9 etc. At whistle four they toggle every fourth locker. At the whistle 5, they toggle every 5th locker, and so on....
There are 100 lockers, at the 100th whistle, the student standing next to locker 100 (and only that student) toggles his locker. How many lockers are then opened?
Re: How many lockers are then opened?
I think ony one locker opened, that is first locker.
---------------------
suresh
Re: How many lockers are then opened?
10 lockers.
All those lockers with locker number equal to a perfect square will remain open, i.e 1, 4, 9, 16, 25, 36, 49, 64, 81, 100
For a locker to remain open it has to be toggled an odd number of times.
e.g
open or open-close-open or open-close-open-close-open and so on.
Since the perfect squares have odd number of factors, the locker number equal to perfect square will remain open.
Like locker number 36.
On first whistle it will get open.
On second whistle it will get closed.
On third whistle it will get open.
On fourth whistle it will get close.
On sixth whistle it will get open.
On ninth whistle it will get closed.
On twelth whistle it will get open.
On eighteenth whistle it will get closed.
On thirtysixth whistle it will get open.