Implement a function that calculates the mean of maximum scores based on a series of test cases involving score modifications.
Functionality
You need to create a function named calculate_mean_max_scores which will take two parameters:
An integer T representing the number of test cases.
A list of test_cases, where each test case is a tuple containing:
An integer N which is the number of students.
An integer M which represents the number of scoring questions.
A list of questions, where each question is represented as a tuple of three integers (i, j, k), indicating that all students from i to j (inclusive) will have their scores multiplied by k.
The function should return a list of integers, where each integer represents the mean maximum score for the corresponding test case. The mean is calculated by summing the modified scores for each student and then dividing by the number of students, using integer division.
Input/Output Requirements
Input
The first argument T (1 ≤ T ≤ 100) indicates the number of test cases.
The second argument test_cases is a list of length T, where each element is a tuple (N, M, questions):
N (1 ≤ N ≤ 1000) indicates the number of students.
M (0 ≤ M ≤ 100) indicates the number of modification questions.
questions is a list of length M, where each element is a tuple (i, j, k):
1 ≤ i ≤ j ≤ N indicates the range of students.
1 ≤ k ≤ 10 is the multiplication factor for the scores.
Output
The function should return a list of length T, where each element is the mean maximum score for the respective test case.
Implementation
Your solution must be written in a file named /app/solution.py. Ensure that your code is well-organized, properly formatted, and includes comments explaining the main logic where necessary.