The Farthest Point

시간 제한2초메모리 제한2048 MB

요약
직육면체 a x b x c에서 한 꼭짓점으로부터 표면을 따라 가장 먼 점까지의 거리를 구한다.
난이도

보통10점 중 5점

유형
기하, 수학, 구현
정답자
아직 제출이 없습니다

문제

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×1×21 \times 1 \times 2, the distance from a vertex to the opposite vertex is the square root of 88. The distance to the farthest point is, however, the square root of 65/865/8 (Figure F.1).

Figure F.1. Rectangular cuboid of size 1×1×21 \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.

aa bb cc

The three integers aa, bb, and cc mean that the size of the rectangular cuboid is a×b×ca \times b \times c. All of them are between 11 and 100100, 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−910^{-9}.

예제5

  1. 예제 1

    입력
    1 1 2
    
    예상 출력
    2.850438562747845
    
  2. 예제 2

    입력
    10 10 10
    
    예상 출력
    22.360679774997898
    
  3. 예제 3

    입력
    100 2 3
    
    예상 출력
    101.0503923792481
    
  4. 예제 4

    입력
    2 3 5
    
    예상 출력
    7.093659140387279
    
  5. 예제 5

    입력
    84 41 51
    
    예상 출력
    124.582755157578