func mySqrt(x int) int { for n := range x+1 { if n*n >= x || (n+1)*(n+1) > x { return n } } return 0 }