For problem statement at 0-999/100-199/160-169/162/problemI.txt this is a correct solution, but verifier at 0-999/100-199/160-169/162/verifierI.go ends with All 100 tests passed. can you fix the verifier? package main
import (
"fmt"
"strconv"
"strings"
)
func isPrime(n int) bool {
if n <= 1 {
return false
}
if n == 2 {
return true
}
if n%2 == 0 {
return false
}
for i := 3; i*i <= n; i += 2 {
if n%i == 0 {
return false
}
}
return true
}
func main() {
var s string
fmt.Scan(&s)
if strings.Contains(s, "0") {
fmt.Println("NO")
return
}
for i := 0; i < len(s); i++ {
val, _ := strconv.Atoi(s[i:])
if !isPrime(val) {
fmt.Println("NO")
return
}
}
fmt.Println("YES")
}