시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 364 304 269 84.062%

문제

특수 상대성 이론에서 가장 흥미를 불러일으키는 예측은 움직이는 물체의 시간이 느리게 간다는 것이다. 효과가 매우 작기 때문에 보통의 경우에는 이 사실을 인지하지 못한다. 하지만, 빛의 속도(초속 299,792,458미터)에 가깝게 움직인다면 효과를 느낄 수 있다.

시간 지연 현상은 쌍둥이 역설로 설명한다. 두 쌍둥이 A와 B가 어렸을 때, A 지구에 남아있고, B 빛의 속도에 가깝게 움직이는 우주선을 타게 된다. 50년이 지난 후에, B는 지구로 돌아오게 된다. 그동안 50살을 먹은 A는 몇 년 밖에 늙지 않은 B를 보고 큰 충격을 받게 된다.

두 쌍둥이가 느끼는 상대적인 시간은 아래와 같은 식으로 나타낼 수 있다.

\[t_{B} =\gamma  t_{A}\]

tB는 우주선을 탄 사람 B가 경험하는 시간이고, tA는 지구에 남아있는 A가 경험하는 시간이다. 변환 계수 γ는 다음과 같이 계산할 수 있다.

\[\gamma = \sqrt{1-\frac{v^{2}}{c^{2}}}\]

v는 우주선의 평균 속도이고, c는 빛의 속도이다. (v의 단위와 c의 단위는 같다)

예를 들어, v가 초속 259,620,268 미터인 경우에 γ = 0.5 (근사값) 이고, 지구에 있는 쌍둥이에게 2년의 시간이 지난 것은 우주선을 탄 쌍둥이가 1년이 지난 것과 같게된다.

tA와 tB가 주어졌을 때, 그러한 차이를 만들기 위해 필요한 우주선의 평균 속도를 구하는 프로그램을 작성하시오.

입력

입력은 여러 개의 테스트 케이스로 이루어져 있다. 각 테스트 케이스는 두 실수로 이루어져 있고, tA와 tB이다. 항상 tA ≥ tB이며, 1.0 ... 100.0 범위를 가진다.

입력의 마지막 줄에는 0이 두 개 주어진다.

출력

각 테스트 케이스에 대해서, 우주선의 평균 속도를 출력한다. 단위는 광속이며, 소수점 셋째 자리 까지 출력한다.

예제 입력 1

10.5 5.25
5 1
0 0

예제 출력 1

0.866
0.980
W3sicHJvYmxlbV9pZ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