← Home
For problem statement at 0-999/500-599/580-589/584/problemB.txt this is a correct solution, but verifier at 0-999/500-599/580-589/584/verifierB.go ends with All tests passed can you fix the verifier? ```go
package main

import "fmt"

const MOD int64 = 1000000007

func modpow(base, exp, mod int64) int64 {
	res := int64(1)
	for exp > 0 {
		if exp%2 == 1 {
			res = (res * base) % mod
		}
		base = (base * base) % mod
		exp /= 2
	}
	return res
}

func main() {
	var n int64
	fmt.Scan(&n)
	total := modpow(27, n, MOD)
	bad := modpow(7, n, MOD)
	ans := (total - bad + MOD) % MOD
	fmt.Println(ans)
}
```