Imagine there are a thousand lockers. A student because of he is bored tried open all the lockers. Then reverse state of the locker (open to close, close to open) every 2 lockers, then 3 and so forth until he does it for the 1000th time. find how many lockers are open.
This one looks familiar actually
The only difference was 1000 students open and close in a row, but i think the solution's the same
so whats the answer then?
is it 31?
nope but i think you get the idea.
yeah i started with close sorry. its 31.
Ok suppose we're talking about n lockers.
If the student a opens locker n, then it will also be opened by a student n/a.
I'm assuming there are 1000 students instead of one, but same idea, i could say if the student opens locker n on the ath turn, he'd reopen it later on (n/a)th turn. So now we have a = n/a, or n = a*a, where n is the number of the open locker.
So now we just have to find squares under 1000. lol I tried 32 - went above 1000 (1024 actually), but 31 works
yeah i thought that i started with opened all then closed all so the answer on that scenario is 1000 - 31. XD
Join our real-time social learning platform and learn together with your friends!