We’re preparing your current view and syncing the latest data.
You have n bulbs, numbered from 1 to n, all initially turned off. You perform n rounds of toggling bulbs. In the ith round, you toggle every bulb that is a multiple of i (if the bulb is off, you turn it on; if it's on, you turn it off). After completing n rounds, determine how many bulbs are turned on.
An integer n representing the number of bulbs and rounds.
An integer representing the number of bulbs that are on after n rounds.
1 <= n <= 10^9