Bulb Switcher

Problem Id: 319 Difficulty: Medium


Intuition

Solution


class Solution:
    def bulbSwitch(self, n: int) -> int:
        return int(math.sqrt(n))