Algorithm · Upstart · Easy
Problem: Scale Ingredient Quantities You are provided with a base recipe expressed as a list of ingredients and a number of people p. Your task is to produce the scaled version of the recipe by multiplying every ingredient's amount by p. Each ingredient entry consists of a numeric amount, a unit, and the ingredient's name. A typical line looks like this: For p people, multiply each amount by p. The unit and ingredient name must remain exactly as they were in the input. Input…
Checking your access…