/**
 * Given a list of account numbers and a list of new account numbers, modify the elements in the first list using slicing
 * and the addition assignment operator.
 *
 * @param accountNumbers The list of account numbers.
 * @param newAccountNumbers The list of new account numbers.
 * @return The modified list of account numbers.
 *
 * Example:
 * accountNumbers = [1001, 1002, 1003, 1004, 1005]
 * newAccountNumbers = [2001, 2002, 2003, 2004, 2005]
 * modifyElements(accountNumbers, newAccountNumbers) -> [1001, 1002 + 2001, 2002, 2003, 1004 + 2004, 1005 + 2005]
 */
fun modifyElements(accountNumbers: MutableList<Int>, newAccountNumbers: List<Int>): List<Int> {

    for (i in accountNumbers.indices) {
        if (i % 2 == 1 && i != 0) {
            accountNumbers[i] += newAccountNumbers[i / 2]
        }
    }
    return accountNumbers
}
/**
 * Given a list of account numbers and a list of new account numbers, modify the elements in the first list using slicing
 * and the addition assignment operator.
 *
 * @param accountNumbers The list of account numbers.
 * @param newAccountNumbers The list of new account numbers.
 * @return The modified list of account numbers.
 *
 * Example:
 * accountNumbers = [1001, 1002, 1003, 1004, 1005]
 * newAccountNumbers = [2001, 2002, 2003, 2004, 2005]
 * modifyElements(accountNumbers, newAccountNumbers) -> [1001, 1002 + 2001, 2002, 2003, 1004 + 2004, 1005 + 2005]
 */
fun modifyElements(accountNumbers: MutableList<Int>, newAccountNumbers: List<Int>): List<Int> {
/**
 * Given a list of account numbers and a list of new account numbers, modify the elements in the first list using slicing
 * and the addition assignment operator.
 *
 * @param accountNumbers The list of account numbers.
 * @param newAccountNumbers The list of new account numbers.
 * @return The modified list of account numbers.
 *
 * Example:
 * accountNumbers = [1001, 1002, 1003, 1004, 1005]
 * newAccountNumbers = [2001, 2002, 2003, 2004, 2005]
 * modifyElements(accountNumbers, newAccountNumbers) -> [1001, 1002 + 2001, 2002, 2003, 1004 + 2004, 1005 + 2005]
 */
fun modifyElements(accountNumbers: MutableList<Int>, newAccountNumbers: List<Int>): List<Int> {

    for (i in accountNumbers.indices) {
        if (i % 2 == 1 && i != 0) {
            accountNumbers[i] += newAccountNumbers[i / 2]
        }
    }
    return accountNumbers
}