319. 灯泡开关 
为保证权益,题目请参考 319. 灯泡开关(From LeetCode).
解决方案1 
Python 
python
# 319. 灯泡开关
# https://leetcode-cn.com/problems/bulb-switcher/
################################################################################
import math
class Solution:
    def bulbSwitch(self, n: int) -> int:
        return int(math.sqrt(n))
################################################################################
if __name__ == "__main__":
    solution = Solution()1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16