欢迎来到起遇信息学
起遇信息学正处于上线筹建阶段,以下功能已全部开放免费体验: ✅ 完整题库浏览与代码提交评测(C / C++ / Python / Java 等) ✅ 入门到进阶的系列课程试读、作业与考试 ✅ AI 提示、AI 作业分析等智能助教功能 ✅ 赛事模拟与个人能力报告 ✅ 邮箱注册开放 ⏳ 付费课程订阅与微信/支付宝支付通道 ⏳ 手机号登录,微信扫码登录、微信公众号绑定 使用中如遇任何问题,欢迎通过页面底部 **"联系我们"** 与我们沟通。
CF919A.Supermarket
Supermarket
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 yuan for kilos (You don't need to care about what "yuan" is), the same as yuan for a kilo.
Now imagine you'd like to buy kilos of apples. You've asked supermarkets and got the prices. Find the minimum cost for those apples.
You can assume that there are enough apples in all supermarkets.
Input
The first line contains two positive integers and (, ), denoting that there are supermarkets and you want to buy kilos of apples.
The following lines describe the information of the supermarkets. Each line contains two positive integers (), denoting that in this supermarket, you are supposed to pay yuan for kilos of apples.
Output
The only line, denoting the minimum cost for kilos of apples. Please make sure that the absolute or relative error between your answer and the correct answer won't exceed .
Formally, let your answer be , and the jury's answer be . Your answer is considered correct if .
Note
In the first sample, you are supposed to buy kilos of apples in supermarket . The cost is yuan.
In the second sample, you are supposed to buy kilo of apples in supermarket . The cost is yuan.
Samples
3 5
1 2
3 4
1 3
1.66666667
2 1
99 100
98 99
0.98989899
在线编程 IDE
建议全屏模式获得最佳体验
| 进入全屏编程 | Alt+E |
| 递交评测 | Ctrl+Enter |
| 注释/取消注释 | Ctrl+/ |
| 缩放字体 | Ctrl+滚轮 |