【LeetCode】319.灯泡开关

#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time: 2019/3/12
# @Author: xfLi
# The file...

import math


def bulbSwitch(n):
    return int(math.sqrt(n))

if __name__ == '__main__':
    n = 6
    result = bulbSwitch(n)
    print(result)

猜你喜欢

转载自blog.csdn.net/qq_30159015/article/details/88537529