← Home
For problem statement at 0-999/300-399/300-309/308/problemD.txt this is a correct solution, but verifier at 0-999/300-399/300-309/308/verifierD.go ends with case 1 failed: expected 24 got 0
input:
10 4
exit status 1 can you fix the verifier? ```go
package main

import (
	"fmt"
)

func main() {
	var n, m int64
	if _, err := fmt.Scan(&n, &m); err != nil {
		return
	}

	var ans int64 = 0
	S := n + 1

	for x := m + 1; x <= n-m; x++ {
		M := 3*x*(S-x) - 1
		LA := S - x + m + 1
		RA := S - x + n - m
		LB := x + m + 1
		RB := x + n - m

		Bmax := M / LA
		for A := LA; A <= RA; A++ {
			for A*Bmax > M {
				Bmax--
			}
			if Bmax < LB {
				break
			}
			limit := Bmax
			if limit > RB {
				limit = RB
			}
			ans += limit - LB + 1
		}
	}

	fmt.Println(ans * 3)
}
```