← Home
For problem statement at 0-999/900-999/910-919/919/problemA.txt this is a correct solution, but verifier at 0-999/900-999/910-919/919/verifierA.go ends with All tests passed can you fix the verifier? package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	in := bufio.NewReader(os.Stdin)
	var n, m int
	if _, err := fmt.Fscan(in, &n, &m); err != nil {
		return
	}
	minPrice := 1e18
	for i := 0; i < n; i++ {
		var a, b int
		fmt.Fscan(in, &a, &b)
		price := float64(a) / float64(b)
		if price < minPrice {
			minPrice = price
		}
	}
	ans := float64(m) * minPrice
	fmt.Printf("%.10f\n", ans)
}