← Home
For problem statement at 0-999/700-799/740-749/746/problemB.txt this is a correct solution, but verifier at 0-999/700-799/740-749/746/verifierB.go ends with All tests passed can you fix the verifier? package main

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

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

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

	pos := make([]int, n)
	for i := 0; i < n; i++ {
		pos[i] = i
	}

	ans := make([]byte, n)

	for i := 0; i < n; i++ {
		mid := (len(pos) - 1) / 2
		ans[pos[mid]] = s[i]
		pos = append(pos[:mid], pos[mid+1:]...)
	}

	fmt.Print(string(ans))
}