文理学院程序设计在线练习


Water cut cake

Time Limit: 1 Second(s)    Memory Limit: 128 MB

Total Submission(s): 1   Accepted Submission(s): 1
Problem Description

In order to celebrate his birthday, Water bought a X * Y rectangular cake. Now, there are n individuals to divide the cake, requiring that The cake area must be the same for everyone. Each cut can only be parallel to any side of the current piece of cake and must divide the cake into two pieces. Obviously, to cut n pieces of cake, you must cut n-1 times. In order to make each cake look beautiful, the maximum value of the ratio of the long side to the short side of the N cake should be the minimum.

Input

Multi cases (<=10), for each case:
Three positive integers: x, y, n(1 <= x, y <= 10000, 1 <= n <= 13)。

Output

Each line outputs a number (4 bits after the decimal point), representing the required ratio.
Sample Input
5 5 5
Sample Output
1.8000
Source

2017绍兴市技能竞赛