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

11792번 - Tom and Jerry 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 256 MB1871138064.000%

문제

Tom and Jerry are very fond of cat and mice games, which might be rather obvious to you. Today they are playing a very complicated game. The goals are simple as usual though, Jerry would be running and Tom would have to catch Jerry.

However, today Jerry is running on a perfect circular path with radius R meters, at a constant speed of V m/s. Initially Tom is sitting at the very center of the circle. He wants to catch Jerry as soon as possible, but we all know, Tom is not very intelligent. Instead of calculating an optimal direction to catch Jerry, he is just running towards Jerry.

As Jerry is also moving, the path Tom has taken start to look like a curve (see picture above). At any given moment, Tom’s position is between Jerry’s current position and the center of the circle. Tom is also moving at a constant speed of V m/s, same speed as Jerry. Find the time (in seconds) Tom would need to catch Jerry.

입력

Input file has T (T <= 10000) test cases, each case consists of two integer R and V. Here, 0 < R, V <= 10000.

출력

For each test case, print the case number and the time Tom will need to catch Jerry. Floating point rounding error lower than 1e-5 will be ignored by the judge.

제한

예제 입력 1

4
45 100
5 1547
1000 10000
5668 5467

예제 출력 1

Case 1: 0.70685835
Case 2: 0.00507691
Case 3: 0.15707963
Case 4: 1.62854830

힌트

출처

ICPC > Regionals > Asia Pacific > Thailand > 2015 ACM-ICPC Asia Phuket Regional Programming Contest I번

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

출처

대학교 대회

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

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