시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 20 11 11 55.000%

문제

상근이는 친구들과 함께 다트를 하는 것을 좋아한다. 상근이는 다트를 잘하지 못한다. 하지만, 수학은 매우 잘한다. 이제 뛰어난 수학실력을 이용해서 다트 점수의 기댓값을 구해보려고 한다.

상근이가 중심으로부터 \(r\)만큼 떨어진 곳을 맞출 확률은 다음과 같다.

\[f(r)=\frac{1}{2 \pi  \sigma^{2}}e^{-\frac{r^2}{2 \sigma^2}}\]

즉, 중심으로부터 거리가 \(r\)만큼 떨어진 곳의 \(\Delta x \cdot \Delta y\)을 맞출 확률은 \(f(r)\Delta x \cdot \Delta y\) 이다. 여기서 \(\sigma\)는 표준 편차이고, 이 값은 지금까지 마신 술의 양에 따라 다르다.

다트에서 점수를 매기는 방식은 아래와 같다.

  • Bull's eye 내부는 50점
  • Bull 고리는 25점
  • 각각의 부채꼴 모양은 겉에 쓰여 있는 숫자만큼 점수
  • 위의 경우에 Triple ring 안에 다트를 맞춘 경우 부채꼴 점수의 3배
  • 또, Double ring 안에 맞춘 경우에는 2배.

Double ring의 바깥에 다트를 맞춘 경우 점수는 0점이다. 모든 부채꼴의 넓이는 같다.

출처: 위키미디어 (CC BY-SA 3.0 licensed by Tijmen Stam)

입력

첫째 줄에 6개의 실수가 주어진다. 이 실수는 Bull'seye, bull, Triple Ring의 안쪽, 바깥쪽, Double Ring의 안쪽 바깥쪽의 반지름이며, 단위는 모두 센티미터이다. 둘째 줄에는 표준 편차 (\sigma\)가 주어지며, 단위는 센티미터이다. 모든 실수는 구간 [10-3,100]에 포함된다.

출력

첫째 줄에 상근이가 다트를 하나 던졌을 때 기댓값을 출력한다. 절대/상대 오차는 10-4까지 허용한다.

예제 입력 1

1.27 3.1 10.9 11.7 16.2 17.0
17.0

예제 출력 1

5.266210658

예제 입력 2

1.27 3.1 10.9 11.7 16.2 17.0
0.5

예제 출력 2

49.00690019

예제 입력 3

0.1 0.2 0.3 0.4 99.9 100
20

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