Suppose you're in a hallway lined with 100 closedlockers.
You begin by opening every locker. Then you close every second locker.
Then you go to every third locker and open it (if it's
closed) or close it (if it's open). Let's call this action
toggling a locker. Continue toggling every nth locker
on pass number n. After 100 passes, where you
toggle only locker #100, how many lockers are open?
Answers
Answered by
2
Answer:
10 lockers will be opened... you see only perfect squares can be opened because the lockers will be opened if it is toggled odd number of times. since perfect squares have odd number of factors the answer is clear that perfect squares will be opened
so lockers numbers 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100. will be left open
for example lets take locker 9 it will be toggled on mubers 1,3,9 (open-close-open)
Similar questions