← Home
For problem statement at 1000-1999/1200-1299/1200-1209/1204/problemA.txt this is a correct solution, but verifier at 1000-1999/1200-1299/1200-1209/1204/verifierA.go ends with All tests passed can you fix the verifier? package main

import (
	"fmt"
	"strings"
)

func main() {
	var s string
	fmt.Scan(&s)
	if s == "0" {
		fmt.Println(0)
	} else if strings.Count(s, "1") > 1 {
		fmt.Println((len(s) + 1) / 2)
	} else {
		fmt.Println(len(s) / 2)
	}
}