Supermarket

题意翻译

题目描述: 有m个超市,在第i个超市买b千克苹果需要花a元。也就是说,花a/b元可以买1kg苹果。每个超市都无限量供应苹果。你要买n千克苹果,问你最少花多少钱。 输入: 第一行两个正整数n和m(1<=n<=5000,1<=m<=100) 接下来m行,每行两个正整数a和b(1<=a,b<=100) 输出: 一行一个实数,表示你最少花的钱。与标准答案的误差不能超过10^(-6) Translated by AKEE

题目描述

We often go to supermarkets to buy some fruits or vegetables, and on the tag there prints the price for a kilo. But in some supermarkets, when asked how much the items are, the clerk will say that $ a $ yuan for $ b $ kilos (You don't need to care about what "yuan" is), the same as $ a/b $ yuan for a kilo. Now imagine you'd like to buy $ m $ kilos of apples. You've asked $ n $ supermarkets and got the prices. Find the minimum cost for those apples. You can assume that there are enough apples in all supermarkets.

输入输出格式

输入格式


The first line contains two positive integers $ n $ and $ m $ ( $ 1<=n<=5000 $ , $ 1<=m<=100 $ ), denoting that there are $ n $ supermarkets and you want to buy $ m $ kilos of apples. The following $ n $ lines describe the information of the supermarkets. Each line contains two positive integers $ a,b $ ( $ 1<=a,b<=100 $ ), denoting that in this supermarket, you are supposed to pay $ a $ yuan for $ b $ kilos of apples.

输出格式


The only line, denoting the minimum cost for $ m $ kilos of apples. Please make sure that the absolute or relative error between your answer and the correct answer won't exceed $ 10^{-6} $ . Formally, let your answer be $ x $ , and the jury's answer be $ y $ . Your answer is considered correct if ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF919A/9c418c1ac059184ac2ec8107da47a63db7a44091.png).

输入输出样例

输入样例 #1

3 5
1 2
3 4
1 3

输出样例 #1

1.66666667

输入样例 #2

2 1
99 100
98 99

输出样例 #2

0.98989899

说明

In the first sample, you are supposed to buy $ 5 $ kilos of apples in supermarket $ 3 $ . The cost is $ 5/3 $ yuan. In the second sample, you are supposed to buy $ 1 $ kilo of apples in supermarket $ 2 $ . The cost is $ 98/99 $ yuan.