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

32502번 - Gears and Axles 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB44353491.892%

문제

You have an assortment of circular gears with varying numbers and sizes of teeth. You also have a motor that spins at one revolution per second, as well as an unlimited number of (identical, arbitrarily long) axles. The motor and all gears fit the axles, and everything attached to a particular axle rotates at the same angular speed. Two gears with the same size teeth can be enmeshed with each other. Gears with different size teeth cannot be enmeshed with each other (though they can be placed on the same axle).

You can arrange the gears and axles in any order. What is the maximum rate at which the last gear/axle in sequence spins that you can achieve? Because this may be large, output the natural log of the value.

입력

The first line of input contains a single integer $n$ (0ドル≤n≤10^5$) denoting the number of gears.

Each of the next $n$ lines contains two integers $s$ (1ドル≤s≤10^5$) and $c$ (3ドル≤c≤10^5$), one for each gear in your collection, where $s$ is the size of the teeth of the gear and $c$ is the count of the number of teeth.

출력

Output a single line with a single number equal to the natural log of the maximum angular speed you can achieve with your motor and axles and gears in your collection. This output will be considered correct if it is within an absolute or relative error of 10ドル^{-6}$ .

제한

예제 입력 1

6
19 364
21 1023
19 66
19 242
21 807
19 675

예제 출력 1

2.9704451880078357

예제 입력 2

4
33 10
33 27
44 10
44 27

예제 출력 2

1.9865035460205664

힌트

출처

ICPC > Regionals > North America > North America Qualification Contest > ICPC North America Qualifier 2024 G번

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

출처

대학교 대회

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

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