logo AlgoBeat OnlineJudge
登录 注册

#213974. [SWERC 2020] Cakes

内存限制:256 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

:::align{center}

:::

This summer, you plan to organize a large party and invite many friends. They have a sweet tooth, so you plan to bake nice cakes for them. You know the recipe for a nice chocolate cake, and you want to cook as many of them as possible.

Given the ingredients needed to make a single cake and the ingredients that you have in your kitchen, how many cakes can you make?

输入格式

  • The first line of the input contains a single integer .
  • Then, lines follow, one for each ingredient. Each of these lines contains two positive integers: the first one is the required quantity of this ingredient per cake, the second one is the quantity of this ingredient you have in your kitchen.

Limits

  • All ingredient quantities will be integers between and .

输出格式

The output should contain a single integer: the maximum number of cakes you can make using the available ingredients.

样例

样例输入 1

3
100 500
2 5
70 1000

样例输出 1

2

样例输入 2

3
100 50
2 5
70 1000

样例输出 2

0