/**
 * Given a list of accountant names and their current salaries,
 * modify the salary of all accountants in the list to the given newSalary.
 *
 * @param accountantList List of accountant names and salaries
 * @param newSalary New salary
 * @return List of accountants with modified salaries
 */
fun modifyList(accountantList: MutableList<String>, newSalary: Double): MutableList<String> {

    for (i in 0 until accountantList.size) {
        val (name, salary) = accountantList[i].split(":")
        val trimmedName = name.trim()
        val currentSalary = salary.trim().toDouble()
        accountantList[i] = "$trimmedName: $newSalary"
    }
    return accountantList
}
/**
 * Given a list of accountant names and their current salaries,
 * modify the salary of all accountants in the list to the given newSalary.
 *
 * @param accountantList List of accountant names and salaries
 * @param newSalary New salary
 * @return List of accountants with modified salaries
 */
fun modifyList(accountantList: MutableList<String>, newSalary: Double): MutableList<String> {
/**
 * Given a list of accountant names and their current salaries,
 * modify the salary of all accountants in the list to the given newSalary.
 *
 * @param accountantList List of accountant names and salaries
 * @param newSalary New salary
 * @return List of accountants with modified salaries
 */
fun modifyList(accountantList: MutableList<String>, newSalary: Double): MutableList<String> {

    for (i in 0 until accountantList.size) {
        val (name, salary) = accountantList[i].split(":")
        val trimmedName = name.trim()
        val currentSalary = salary.trim().toDouble()
        accountantList[i] = "$trimmedName: $newSalary"
    }
    return accountantList
}