mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-10 13:37:33 +08:00
Update solution 0319
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# [319. Bulb Switcher](https://leetcode-cn.com/problems/bulb-switcher/)
|
||||
# [319. Bulb Switcher](https://leetcode.com/problems/bulb-switcher/)
|
||||
|
||||
|
||||
## 题目
|
||||
@ -46,6 +46,7 @@ Return the number of bulbs that are on after n rounds.
|
||||
## 代码
|
||||
|
||||
```go
|
||||
|
||||
package leetcode
|
||||
|
||||
import "math"
|
||||
@ -53,4 +54,5 @@ import "math"
|
||||
func bulbSwitch(n int) int {
|
||||
return int(math.Sqrt(float64(n)))
|
||||
}
|
||||
|
||||
```
|
Reference in New Issue
Block a user