← Home
For problem statement at 1000-1999/1700-1799/1790-1799/1798/problemC.txt this is a correct solution, but verifier at 1000-1999/1700-1799/1790-1799/1798/verifierC.go ends with reference failed: exec: "refC_bin": executable file not found in $PATH can you fix the verifier? ```go
package main

import (
	"bufio"
	"io"
	"os"
	"strconv"
)

func gcd(a, b int64) int64 {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

func lcm(a, b int64) int64 {
	return (a / gcd(a, b)) * b
}

func main() {
	buf, _ := io.ReadAll(os.Stdin)
	pos := 0
	nextInt64 := func() int64 {
		for pos < len(buf) && buf[pos] <= ' ' {
			pos++
		}
		if pos >= len(buf) {
			return 0
		}
		var res int64
		for pos < len(buf) && buf[pos] > ' ' {
			res = res*10 + int64(buf[pos]-'0')
			pos++
		}
		return res
	}

	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	t := nextInt64()
	for tc := int64(0); tc < t; tc++ {
		n := nextInt64()
		ans := 1
		var G, L int64

		for i := int64(0); i < n; i++ {
			a := nextInt64()
			b := nextInt64()
			if i == 0 {
				G = a * b
				L = b
			} else {
				gNext := gcd(G, a*b)
				lNext := lcm(L, b)
				if gNext%lNext == 0 {
					G = gNext
					L = lNext
				} else {
					ans++
					G = a * b
					L = b
				}
			}
		}
		out.WriteString(strconv.Itoa(ans) + "\n")
	}
}
```