package main
import "fmt"
func main() {
numbers := []int{1, 2, 3, 4, 5, 5, 6, 7, 5, 8, 9}
i := 0
for i < len(numbers) {
if numbers[i] == 5 {
numbers = append(numbers[:i], numbers[i+1:]...)
} else {
i++
}
if len(numbers) == 0 {
break
}
}
fmt.Println(numbers) // 输出: []
}