319. Bulb Switcher
Python
import math
class Solution:
def bulbSwitch(self, n: int) -> int:
if n <= 1:
return n
return int(math.sqrt(n))
import math
class Solution:
def bulbSwitch(self, n: int) -> int:
if n <= 1:
return n
return int(math.sqrt(n))