Results 1 to 3 of 3

Thread: How many lockers are then opened?

  1. #1
    Expert Member
    Join Date
    Apr 2007
    Answers
    147

    Thumbs up 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?


  2. #2
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: How many lockers are then opened?

    I think ony one locker opened, that is first locker.

    ---------------------
    suresh


  3. #3
    Expert Member
    Join Date
    Jan 2007
    Answers
    272

    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.

    [B][COLOR="Blue"]Anyone who thinks he knows all the answers, must not be up-to-date on the questions[/COLOR][/B]
    [B]Anshul[/B]:)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact