/**
 * Given a list of accounts and their respective expenses,
 * calculate the profit for each account and return a map
 * with the account as the key and the profit as the value.
 *
 * @param accounts a list of account names
 * @param expenses a map containing expenses for each account
 * @return a map containing the profit for each account
 *
 * Example:
 * val accounts = listOf("Account A", "Account B", "Account C")
 * val expenses = mapOf("Account A" to 5000, "Account B" to 3000, "Account C" to 8000)
 * calculateProfit(accounts, expenses) -> mapOf("Account A" to 2000, "Account B" to 0, "Account C" to -5000)
 */
fun calculateProfit(accounts: List<String>, expenses: Map<String, Int>): Map<String, Int> {

    val profits = mutableMapOf<String, Int>()
    for (account in accounts) {
        profits[account] = expenses.getOrDefault(account, 0) - 3000
    }
    return profits
}
/**
 * Given a list of accounts and their respective expenses,
 * calculate the profit for each account and return a map
 * with the account as the key and the profit as the value.
 *
 * @param accounts a list of account names
 * @param expenses a map containing expenses for each account
 * @return a map containing the profit for each account
 *
 * Example:
 * val accounts = listOf("Account A", "Account B", "Account C")
 * val expenses = mapOf("Account A" to 5000, "Account B" to 3000, "Account C" to 8000)
 * calculateProfit(accounts, expenses) -> mapOf("Account A" to 2000, "Account B" to 0, "Account C" to -5000)
 */
fun calculateProfit(accounts: List<String>, expenses: Map<String, Int>): Map<String, Int> {
/**
 * Given a list of accounts and their respective expenses,
 * calculate the profit for each account and return a map
 * with the account as the key and the profit as the value.
 *
 * @param accounts a list of account names
 * @param expenses a map containing expenses for each account
 * @return a map containing the profit for each account
 *
 * Example:
 * val accounts = listOf("Account A", "Account B", "Account C")
 * val expenses = mapOf("Account A" to 5000, "Account B" to 3000, "Account C" to 8000)
 * calculateProfit(accounts, expenses) -> mapOf("Account A" to 2000, "Account B" to 0, "Account C" to -5000)
 */
fun calculateProfit(accounts: List<String>, expenses: Map<String, Int>): Map<String, Int> {

    val profits = mutableMapOf<String, Int>()
    for (account in accounts) {
        profits[account] = expenses.getOrDefault(account, 0) - 3000
    }
    return profits
}