/**
 * This function calculates the results for a physical therapist based on the number of therapy sessions, the weights
 * of the patient, and the list of exercises performed during the sessions.
 *
 * @param therapySessions Number of therapy sessions.
 * @param weights Dictionary mapping exercise names to the weights of the patient for each exercise.
 * @param exercises List of exercises performed during the therapy sessions.
 * @return A dictionary mapping exercise names to the total time spent on each exercise during the therapy sessions.
 */
fun calculatePatientResults(therapySessions: Int, weights: Map<String, Int>, exercises: List<String>): Map<String, Int> {

    // Create an empty dictionary to store the results
    val results = mutableMapOf<String, Int>()

    // Iterate over the exercises
    for (exercise in exercises) {
        // Check if the exercise exists in the weights dictionary
        if (weights.containsKey(exercise)) {
            // Calculate the total time for the exercise by multiplying the weight with the number of therapy sessions
            val totalTime = weights[exercise]!! * therapySessions

            // Add the exercise and total time to the results dictionary
            results[exercise] = totalTime
        }
    }

    return results
}
/**
 * This function calculates the results for a physical therapist based on the number of therapy sessions, the weights
 * of the patient, and the list of exercises performed during the sessions.
 *
 * @param therapySessions Number of therapy sessions.
 * @param weights Dictionary mapping exercise names to the weights of the patient for each exercise.
 * @param exercises List of exercises performed during the therapy sessions.
 * @return A dictionary mapping exercise names to the total time spent on each exercise during the therapy sessions.
 */
fun calculatePatientResults(therapySessions: Int, weights: Map<String, Int>, exercises: List<String>): Map<String, Int> {
/**
 * This function calculates the results for a physical therapist based on the number of therapy sessions, the weights
 * of the patient, and the list of exercises performed during the sessions.
 *
 * @param therapySessions Number of therapy sessions.
 * @param weights Dictionary mapping exercise names to the weights of the patient for each exercise.
 * @param exercises List of exercises performed during the therapy sessions.
 * @return A dictionary mapping exercise names to the total time spent on each exercise during the therapy sessions.
 */
fun calculatePatientResults(therapySessions: Int, weights: Map<String, Int>, exercises: List<String>): Map<String, Int> {

    // Create an empty dictionary to store the results
    val results = mutableMapOf<String, Int>()

    // Iterate over the exercises
    for (exercise in exercises) {
        // Check if the exercise exists in the weights dictionary
        if (weights.containsKey(exercise)) {
            // Calculate the total time for the exercise by multiplying the weight with the number of therapy sessions
            val totalTime = weights[exercise]!! * therapySessions

            // Add the exercise and total time to the results dictionary
            results[exercise] = totalTime
        }
    }

    return results
}