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

17935번 - Infinite Slides 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB157746.667%

문제

Agneta and Beata are visiting the famous Swedish Amusement Park of Infinite Fun and Games. Their favourite attraction is the Infinitely Long Slides. Each slide can be viewed as an infinitely long, completely vertical spiral of radius 1ドル$.

When projected into the (flat) ground, the first slide has $(0, 0)$ as its centre point, and the second one has $(1, 0)$ as its centre point. Furthermore, the start of the slides are at $(1, 0)$ and $(2, 0)$ respectively, and then proceeds counter-clockwise around their respective centres. When Agneta rides her slide (the first one), she does so with vertical speed 1ドル\text{ m/s},ドル while Beatas slide has a bit higher gradient, so she goes with vertical speed 2ドル\text{ m/s}$. However, their angular speeds around the centre is both equal to 1ドル \text{ rad/s}$. Since Beata is a little afraid of the slides, she always waits for Agneta to go first. $W$ seconds after Agneta went, Beata starts her descent.

To make the infinite ride a bit more fun, the amusement park gives a price if the two riders on the slides manage to pass a ball between them at some point. This price consists of a lot of chocolate, which is Beata's favourite treat. To maximize their chances of passing the ball successfully, they want to wait until their Euclidean distance is the smallest possible during the ride. How small will this distance be?

입력

The first and only line of the input contains the decimal number 0ドル \le W \le 1000$. The number contains at most 6ドル$ digits after the decimal point.

출력

Output a single number -- the minimal Euclidean distance between Agneta and Beata during their trip. Your answer will be accepted if it is within a relative or absolute error of 10ドル^{-4}$ of the judges' answer.

제한

예제 입력 1

0

예제 출력 1

1

예제 입력 2

6.283185

예제 출력 2

1

예제 입력 3

42

예제 출력 3

1.5228490019

예제 입력 4

1.047198

예제 출력 4

2

힌트

출처

Contest > Swedish Coding Cup > HiQ Challenge 2017 F번

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

출처

대학교 대회

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

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