For problem statement at 0-999/200-299/220-229/226/problemA.txt this is a correct solution, but verifier at 0-999/200-299/220-229/226/verifierA.go ends with All 105 tests passed can you fix the verifier? package main
import "fmt"
func pow(base, exp, mod int64) int64 {
var res int64 = 1
base %= mod
for exp > 0 {
if exp%2 == 1 {
res = (res * base) % mod
}
base = (base * base) % mod
exp /= 2
}
return res
}
func main() {
var n, m int64
if _, err := fmt.Scan(&n, &m); err == nil {
fmt.Println((pow(3, n, m) - 1 + m) % m)
}
}