For example, on the first pass, we will toggle all the doors, on the second, we will toggle only the even-numbered doors, on the third - only doors whose number is divisible by three, and so on.
At the end of the 100 passes, how many doors will be left open?
(from techInterview.org)