Practice - 1 "Sofia the first". Linear Algorithms




Task
Time limit: 1000 ms,
Memory limit: 256 Mb

Marmalade Fruit Preserves Jar Clip Art - Jam @clipartmax.comRabbit 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

Auto CHOOSE THE PROGRAMMING NECESSARY LANGUAGE!
Attach the program source file:
or enter the source code in the language:

Rules for designing programs and a list of errors during automatic task verification
           

Results: