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

import (
	"fmt"
	"strings"
)

func main() {
	var n int
	fmt.Scan(&n)

	size := 2*n + 1

	for row := 0; row < size; row++ {
		// Calculate the "level" - how far from center row
		level := n - row
		if level < 0 {
			level = -level
		}

		// The max digit in this row
		maxDigit := n - level

		// Number of digits in this row = 2*maxDigit + 1
		// Spaces before = n - maxDigit
		spaces := n - maxDigit

		// Build the row string
		// Digits go from 0 to maxDigit and back: 0 1 2 ... maxDigit ... 2 1 0
		var parts []string
		for d := 0; d <= maxDigit; d++ {
			parts = append(parts, fmt.Sprintf("%d", d))
		}
		for d := maxDigit - 1; d >= 0; d-- {
			parts = append(parts, fmt.Sprintf("%d", d))
		}

		line := strings.Repeat(" ", spaces) + strings.Join(parts, " ")
		fmt.Println(line)
	}
}
```