## DMOPC '16 Contest 3 P0 - Negative Feedback

View as PDF

Points: 3
Time limit: 1.0s
Memory limit: 64M

Authors:
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

nitewing was stuck in the never-ending TEJ classes. Being very fast, he finishes all the work the teacher assigned and decides to do some research on operational amplifiers.

nitewing realizes that operational amplifiers have a wide variety of uses. He finds out that an ideal operational amplifier would amplify the difference between the non-inverting input (denoted in the diagram with a +) and the inverting input (denoted in the diagram with a -), with an infinite gain.

nitewing finds out that without a feedback loop, the operational amplifier would only act as a comparator. Since he is only interested in non-inverting amplifiers, he connects the operational amplifier in a negative feedback loop configuration, like so:

nitewing wants to be able to calculate the output voltage, given the input voltage and the values of the two resistors. He goes on Wikipedia and finds the formula:

Since he has other work to do, he leaves this task to you. Can you help him solve this problem?

Assume that the operational amplifiers are ideal and do not saturate.

#### Input Specification

The first and only line of input will contain , , .

#### Output Specification

Compute and output the value of for the given , and , using the formula described above.

Your answer will be considered correct if it is within a relative or absolute error of .

#### Sample Input

3 100 120

#### Sample Output

5.5

#### Explanation

The output is obtained by .