Submit | All submissions | Best solutions | Back to list |
HS11INV - Investment |
Robert has decided to invest some of his savings. The unit of the investment fund he has chosen was worth X$ at the moment of purchase. Suppose that at the moment of withdrawal one unit cost Y$. Please calculate Robert's return on investment, assuming that a 4% fee has to be paid once, at the moment of withdrawal.
Input
The first line contains the number X with two digits of precision, and the second line contains the number Y with two digits of precision.
Output
One number, being Robert's return on investment, displayed as a percentage, with two digits of precision.
Example 1
Input: 100.00 120.00
Output: 15.20
Example 2
Input: 40.00 50.00
Output: 20.00
Scoring
This is a test problem and you will receive no points for solving it. However, at 18:00 on Monday, October 10, we will give out a small gift to a user, drawn from among those registered contestants who have solved this problem in more programming languages (available at SPOJ) then all other registered contestants. Note: the special contest is over now.
Added by: | kuszi |
Date: | 2011-08-28 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | ADA95 ASM32 BASH BF C CSHARP C++ 4.3.2 CPP C99 CLPS CLOJURE LISP sbcl LISP clisp D ERL FSHARP FORTRAN GO HASK ICON ICK JAVA JS-RHINO LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PERL6 PHP PIKE PRLG-swi PYTHON PYTHON3 RUBY SCALA SCM guile SCM qobi ST TCL WHITESPACE |
Resource: | High School Programming League |