CF77E.Martian Food

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Have you ever tasted Martian food? Well, you should.

Their signature dish is served on a completely black plate with the radius of RR , flat as a pancake.

First, they put a perfectly circular portion of the Golden Honduras on the plate. It has the radius of rr and is located as close to the edge of the plate as possible staying entirely within the plate. I. e. Golden Honduras touches the edge of the plate from the inside. It is believed that the proximity of the portion of the Golden Honduras to the edge of a plate demonstrates the neatness and exactness of the Martians.

Then a perfectly round portion of Pink Guadeloupe is put on the plate. The Guadeloupe should not overlap with Honduras, should not go beyond the border of the plate, but should have the maximum radius. I. e. Pink Guadeloupe should touch the edge of the plate from the inside, and touch Golden Honduras from the outside. For it is the size of the Rose Guadeloupe that shows the generosity and the hospitality of the Martians.

Further, the first portion (of the same perfectly round shape) of Green Bull Terrier is put on the plate. It should come in contact with Honduras and Guadeloupe, should not go beyond the border of the plate and should have maximum radius.

Each of the following portions of the Green Bull Terrier must necessarily touch the Golden Honduras, the previous portion of the Green Bull Terrier and touch the edge of a plate, but should not go beyond the border.

To determine whether a stranger is worthy to touch the food, the Martians ask him to find the radius of the kk -th portion of the Green Bull Terrier knowing the radii of a plate and a portion of the Golden Honduras. And are you worthy?

输入格式

The first line contains integer tt ( 1<=t<=1041<=t<=10^{4} ) — amount of testcases.

Each of the following tt lines contain three positive integers: the radii of the plate and a portion of the Golden Honduras RR and rr ( 1<=r<R<=10^{4} ) and the number kk ( 1<=k<=1041<=k<=10^{4} ).

In the pretests 1<=k<=21<=k<=2 .

输出格式

Print tt lines — the radius of the kk -th portion of the Green Bull Terrier for each test. The absolute or relative error of the answer should not exceed 10610^{-6} .

输入输出样例

  • 输入#1

    2
    4 3 1
    4 2 2
    

    输出#1

    0.9230769231
    0.6666666667
    

说明/提示

Dish from the first sample looks like this:

Dish from the second sample looks like this:

首页