Day31 - 贪心算法 Part05

24 阅读1分钟

基础

刷题

  1. 合并区间

leetcode.cn/problems/me…

image.png

  1. 单调递增的数字

leetcode.cn/problems/mo…

image.png

  1. 监控二叉树

leetcode.cn/problems/bi…

image.png

image.png

总结

golang幂运算

package main
 
import (
    "fmt"
    "math"
)
 
func main() {
    // 计算2的3次幂
    result := math.Pow(2, 3)
    fmt.Println(result) // 输出: 8
 
    // 计算5的2.5次幂
    result2 := math.Pow(5, 2.5)
    fmt.Println(result2) // 输出: 31.622776601683793
}