Adjust Recipe Quantities

Implement adjust_quantities(nb_persons, ingredients) to scale a one-person recipe to serve nb_persons people.

Each ingredient string has the following format:

<positive integer><one spac...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: