← Home
For problem statement at 1000-1999/1000-1099/1040-1049/1041/problemB.txt this is a correct solution, but verifier at 1000-1999/1000-1099/1040-1049/1041/verifierB.go ends with All tests passed can you fix the verifier? ```go
package main

import (
	"fmt"
)

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

func main() {
	var a, b, x, y int64
	fmt.Scan(&a, &b, &x, &y)
	g := gcd(x, y)
	x /= g
	y /= g
	ans := a / x
	if b/y < ans {
		ans = b / y
	}
	fmt.Println(ans)
}
```