/**
 * Given a list of revenue and a list of expenses, calculate the total expenses for each accountant.
 *
 * @param revenue A list of revenue for each accountant.
 * @param expenses A list of expenses for each accountant.
 * @return A list of total expenses for each accountant.
 */
fun calculateTotalExpenses(revenue: List<List<Int>>, expenses: List<List<Int>>): List<Int> {

    val totalExpenses = mutableListOf<Int>()

    // Iterate over each accountant
    for (i in revenue.indices) {
        val accountantRevenue = revenue[i]
        val accountantExpenses = expenses[i]

        // Calculate total expenses for each accountant
        var total = 0

        // Iterate over each expense category for the accountant
        for (expense in accountantExpenses) {
            total += expense
        }

        totalExpenses.add(total)
    }

    return totalExpenses
}
/**
 * Given a list of revenue and a list of expenses, calculate the total expenses for each accountant.
 *
 * @param revenue A list of revenue for each accountant.
 * @param expenses A list of expenses for each accountant.
 * @return A list of total expenses for each accountant.
 */
fun calculateTotalExpenses(revenue: List<List<Int>>, expenses: List<List<Int>>): List<Int> {
/**
 * Given a list of revenue and a list of expenses, calculate the total expenses for each accountant.
 *
 * @param revenue A list of revenue for each accountant.
 * @param expenses A list of expenses for each accountant.
 * @return A list of total expenses for each accountant.
 */
fun calculateTotalExpenses(revenue: List<List<Int>>, expenses: List<List<Int>>): List<Int> {

    val totalExpenses = mutableListOf<Int>()

    // Iterate over each accountant
    for (i in revenue.indices) {
        val accountantRevenue = revenue[i]
        val accountantExpenses = expenses[i]

        // Calculate total expenses for each accountant
        var total = 0

        // Iterate over each expense category for the accountant
        for (expense in accountantExpenses) {
            total += expense
        }

        totalExpenses.add(total)
    }

    return totalExpenses
}