← Home
For problem statement at 0-999/200-299/250-259/259/problemB.txt this is a correct solution, but verifier at 0-999/200-299/250-259/259/verifierB.go ends with case 1 failed: expected
31 33 8
35 34 3
23 42 7

got
34 33 8
35 31 3
23 42 4
input:
0 33 8
35 0 3
23 42 0
exit status 1 can you fix the verifier? ```go
package main

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

func main() {
	in := bufio.NewReader(os.Stdin)

	var a [3][3]int
	for i := 0; i < 3; i++ {
		for j := 0; j < 3; j++ {
			fmt.Fscan(in, &a[i][j])
		}
	}

	s1 := a[0][1] + a[0][2]
	s2 := a[1][0] + a[1][2]
	s3 := a[2][0] + a[2][1]

	x := (s2 + s3 - s1) / 2
	a[0][0] = x + s1 - s2
	a[1][1] = x
	a[2][2] = x + s2 - s3

	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	for i := 0; i < 3; i++ {
		fmt.Fprintln(out, a[i][0], a[i][1], a[i][2])
	}
}
```