## Mock CCC '18 Contest 1 J3/S1 - A Math Problem

View as PDF

Points: 5 (partial)
Time limit: 5.0s
Memory limit: 1G

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Given positive integers , , and , compute the minimum possible value of given that must be a positive integer.

#### Input Specification

The input consists of a single line containing three space-separated integers , , and .

#### Output Specification

Print, on a single line, the minimum possible value of subject to the above constraint, rounded to exactly three decimal places.

The input data will be set such that the correct answer will not be within of the aforementioned rounding boundary.

31 41 59

549.200

3 4 5

#### Sample Output

16.000

• commented on May 4, 2019, 8:03 p.m. edited

...was my solution intended? I thought for sure that I needed some calculus for this or else I would TLE haha

• commented on May 4, 2019, 8:50 p.m.

nope, the problem is only 5 points, it's not supposed to be that hard!

• commented on March 10, 2019, 12:08 a.m.

How come I am getting the answers to be actually 15.492 and 547.682? I tested these answers and they seem to yield lower answers for f(M) which makes the test cases wrong. But I must be missing something... I initially thought maybe they only wanted the first decimal place but when I do that, I get some of the other answers wrong. So could someone tell me what is wrong with these answers?

• commented on May 3, 2019, 6:40 p.m.

I am assuming you are directly applying AM-GM, and the inequality holds iff but may have non-integer solutions.

• commented on Oct. 13, 2018, 8:41 p.m.

How come derivative is not accurate enough?

• commented on Jan. 23, 2019, 4:04 p.m.

gotta use double