Module: (Python) Workshop - 1 "Sofia the first". Linear Algorithms


Problem

1 /11


Jam recipe

Problem

Marmalade Fruit Preserves Jar Clip Art - Jam @clipartmax.comRabbit Clever and Princess 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 <= 106) 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