← Home
For problem statement at 0-999/600-699/660-669/667/problemB.txt this is a correct solution, but verifier at 0-999/600-699/660-669/667/verifierB.go ends with All 100 tests passed can you fix the verifier? ```go
package main

import (
	"fmt"
	"io"
	"os"
)

func main() {
	buf, _ := io.ReadAll(os.Stdin)
	var n, l, sum, maxL int64
	idx := 0
	for idx < len(buf) && (buf[idx] < '0' || buf[idx] > '9') {
		idx++
	}
	for idx < len(buf) && buf[idx] >= '0' && buf[idx] <= '9' {
		n = n*10 + int64(buf[idx]-'0')
		idx++
	}
	for i := int64(0); i < n; i++ {
		for idx < len(buf) && (buf[idx] < '0' || buf[idx] > '9') {
			idx++
		}
		if idx >= len(buf) {
			break
		}
		l = 0
		for idx < len(buf) && buf[idx] >= '0' && buf[idx] <= '9' {
			l = l*10 + int64(buf[idx]-'0')
			idx++
		}
		sum += l
		if l > maxL {
			maxL = l
		}
	}
	fmt.Println(2*maxL - sum + 1)
}
```