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

33004번 - The Farthest Point 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB47282180.769%

문제

An ant is on one of the vertices, say the starting vertex, of a rectangular cuboid (a hexahedron with all of its faces being rectangular). The surface of the cuboid constitutes the entire world of the ant.

We’d like to know which point on the surface of the cuboid is the farthest for the ant from the starting vertex. You may think that the opposite vertex, that is, the opposite end of the interior diagonal from the starting vertex, is the farthest. The opposite vertex is, however, not necessarily the farthest.

For example, on the surface of a cuboid of size 1ドル \times 1 \times 2,ドル the distance from a vertex to the opposite vertex is the square root of 8ドル$. The distance to the farthest point is, however, the square root of 65ドル/8$ (Figure F.1).

Figure F.1. Rectangular cuboid of size 1ドル \times 1 \times 2,ドル and its net

You are given the size of the rectangular cuboid. Write a program which calculates the distance from the starting vertex to the farthest point.

입력

The input consists of a single test case of the following format.

$a$ $b$ $c$

The three integers $a,ドル $b,ドル and $c$ mean that the size of the rectangular cuboid is $a \times b \times c$. All of them are between 1ドル$ and 100ドル,ドル inclusive.

출력

Output a line containing the distance from the starting vertex to the farthest point. The relative error of the output must be less than or equal to 10ドル^{-9}$.

제한

예제 입력 1

1 1 2

예제 출력 1

2.850438562747845

예제 입력 2

10 10 10

예제 출력 2

22.360679774997898

예제 입력 3

100 2 3

예제 출력 3

101.0503923792481

예제 입력 4

2 3 5

예제 출력 4

7.093659140387279

예제 입력 5

84 41 51

예제 출력 5

124.582755157578

힌트

출처

ICPC > Regionals > Asia Pacific > Japan > 2024 ICPC Asia Yokohama Regional Contest F번

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

출처

대학교 대회

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

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