For problem statement at 0-999/0-99/70-79/71/problemC.txt this is a correct solution, but verifier at 0-999/0-99/70-79/71/verifierC.go ends with All tests passed can you fix the verifier? package main
import (
"fmt"
"io"
"os"
)
func main() {
data, _ := io.ReadAll(os.Stdin)
idx := 0
nextInt := func() int {
for idx < len(data) && (data[idx] < '0' || data[idx] > '9') {
idx++
}
v := 0
for idx < len(data) && data[idx] >= '0' && data[idx] <= '9' {
v = v*10 + int(data[idx]-'0')
idx++
}
return v
}
n := nextInt()
a := make([]int, n)
for i := 0; i < n; i++ {
a[i] = nextInt()
}
divs := make([]int, 0)
for d := 1; d*d <= n; d++ {
if n%d == 0 {
if n/d >= 3 {
divs = append(divs, d)
}
if d*d != n && d >= 3 {
divs = append(divs, n/d)
}
}
}
for _, g := range divs {
for s := 0; s < g; s++ {
ok := true
for i := s; i < n; i += g {
if a[i] == 0 {
ok = false
break
}
}
if ok {
fmt.Print("YES")
return
}
}
}
fmt.Print("NO")
}