Task Description: Calculate the Number of Cupcakes
Functionality
Implement a function in Python that calculates the total number of cupcakes based on given test cases. Each test case consists of two integers, R and C, representing the number of rows and columns of cupcakes, respectively. The function should return a list of results, where each result is the product of R and C for the corresponding test case.
Input/Output Requirements
Input:
The function calculate_cupcakes(test_cases) takes a single argument:
test_cases: A list of tuples, where each tuple contains two integers (R, C).
Output:
The function returns a list of integers. Each integer represents the total number of cupcakes for each test case, calculated as R * C.
Here, for the first test case, there are 2 rows and 3 columns, giving a total of 6 cupcakes. For the second test case, the total is 20 cupcakes from 4 rows and 5 columns.
Implementation
Save your implementation in a file located at /app/solution.py. The file should contain the calculate_cupcakes function as defined in the provided signature and implementation.