Mock CCO '19 Contest 2 Problem 4 - A Geometry Problem

View as PDF

Submit solution

Points: 5 (partial)
Time limit: 0.5s
Memory limit: 162M

Problem types

The beauty of a rectangle is the ratio between the length of the longer side and the length of the shorter side.

Given a rectangle with side lengths X and Y, repeat the following process until you have N rectangles:

Select one rectangle
Cut it into two rectangles

After doing this, all rectangles must have the same area.

The beauty of a set of rectangles is the maximum beauty present among all rectangles in the set. Compute the minimum possible beauty of the set assuming optimal cuts.

Constraints

1 \le N \le 10

1 \le X, Y \le 10^4

Input Specification

The first and only line contains three space-separated integers, X, Y, and N.

Output Specification

Output the desired beauty to exactly six decimal places.

Sample Input

5 5 5

Sample Output

1.800000

Comments

There are no comments at the moment.