← Home
For problem statement at 1000-1999/1100-1199/1180-1189/1189/problemA.txt this is a correct solution, but verifier at 1000-1999/1100-1199/1180-1189/1189/verifierA.go ends with All 100 tests passed can you fix the verifier? package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	var n int
	var s string
	fmt.Fscan(in, &n)
	fmt.Fscan(in, &s)

	zeros, ones := 0, 0
	for _, c := range s {
		if c == '0' {
			zeros++
		} else {
			ones++
		}
	}

	if zeros != ones {
		fmt.Fprintln(out, 1)
		fmt.Fprintln(out, s)
	} else {
		fmt.Fprintln(out, 2)
		fmt.Fprintln(out, s[:n-1], s[n-1:])
	}
}