You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are N bulbs that are initially off. In the first round, you turn ON all the bulbs, then you turn off every second bulb in the second round. On the third round, you toggle every third bulb (turning ON if it's OFF or vice-versa). For the Ith round, you toggle every Ith bulb. For the Nth round, you only toggle the last bulb.
Return the number of bulbs that are ON after the N rounds.