Bulb Switcher
Bulb Switcher starts with n bulbs off and runs n rounds. The first toggles all bulbs, while later rounds toggle every second, third, or later bulb as appropriate. Return how many remain on.
We'll cover the following...
We'll cover the following...
Statement
You are given n bulbs, all initially turned off. You perform n rounds of toggling operations: ...