首页 > TAG信息列表 > 400ms
Go 多线程 API
//400ms package main import ( "fmt" "time" ) const SIZE uint = 4 const limit uint = 4e9 func sum(l uint, r uint, c chan uint) { sum := uint(0) for i := l; i <= r; i++ { sum += i ^ limit } c <- sum } func main() {Go 多线程 API
//400ms package main import ( "fmt" "time" ) const SIZE uint = 4 const limit uint = 4e9 func sum(l uint, r uint, c chan uint) { sum := uint(0) for i := l; i <= r; i++ { sum += i ^ limit } c <- sum } func main() {