Logo
(追記) (追記ここまで)

21212번 - Cakes 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB59952749588.551%

문제

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 $N$ 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 $N$.
  • Then, $N$ 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.

출력

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

제한

  • 1ドル \leq N \leq 10$
  • All ingredient quantities will be integers between 1ドル$ and 10ドル,000円$.

예제 입력 1

3
100 500
2 5
70 1000

예제 출력 1

2

예제 입력 2

3
100 50
2 5
70 1000

예제 출력 2

0

힌트

출처

ICPC > Regionals > Europe > Southwestern European Regional Contest > SWERC 2020-2021 E번

  • 문제를 만든 사람: Raphaël Marinier
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /