/**
 * This function takes in a list of positive integers and a number. It appends the number to the end of the list and then removes all occurrences of the number from the list.
 *
 * @param intList A list of positive integers.
 * @param num A positive integer.
 * @return A modified list with the number appended and all occurrences of the number removed.
 */
fun appendRemovePositiveIntegers(intList: MutableList<Int>, num: Int): List<Int> {

    // Append the number to the end of the list
    intList.add(num)

    // Remove all occurrences of the number from the list
    intList.removeAll { it == num }

    return intList
}
/**
 * This function takes in a list of positive integers and a number. It appends the number to the end of the list and then removes all occurrences of the number from the list.
 *
 * @param intList A list of positive integers.
 * @param num A positive integer.
 * @return A modified list with the number appended and all occurrences of the number removed.
 */
fun appendRemovePositiveIntegers(intList: MutableList<Int>, num: Int): List<Int> {
/**
 * This function takes in a list of positive integers and a number. It appends the number to the end of the list and then removes all occurrences of the number from the list.
 *
 * @param intList A list of positive integers.
 * @param num A positive integer.
 * @return A modified list with the number appended and all occurrences of the number removed.
 */
fun appendRemovePositiveIntegers(intList: MutableList<Int>, num: Int): List<Int> {

    // Append the number to the end of the list
    intList.add(num)

    // Remove all occurrences of the number from the list
    intList.removeAll { it == num }

    return intList
}