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

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

func main() {
	input, _ := io.ReadAll(os.Stdin)
	m := map[byte]int{
		'>': 8, '<': 9, '+': 10, '-': 11,
		'.': 12, ',': 13, '[': 14, ']': 15,
	}
	ans := 0
	for _, c := range input {
		if v, ok := m[c]; ok {
			ans = (ans*16 + v) % 1000003
		}
	}
	fmt.Println(ans)
}