Task
Time limit:
1000 ms,
Memory limit:
256 Mb
Rabbit Clover and Princess Sofia found a cherry jam recipe.
The recipe for cherry jam is quite simple: "For jam, take cherries, sugar and water in the ratio
\(3:2:1\)."
Help your friends calculate how much jam they get if they take water in the amount of
n liters (we assume that the water does not boil). How much should I take cherries and sugar?
Write for friends a program that, according to the inputed value of water (
\(n <= 10^6)\) will output how much cherry and sugar should be taken and how much jam will be obtained.
Example
№ |
Input |
Output |
1 |
2 |
water - 2 kg
cherry - 6 kg
sugar - 4 kg
jam - 12 kg |