/**
 * Given a positive integer 'n' and an initial element, create a list of size 'n' with each
 * element being the next multiple of the initial element. If the initial element is 0, the elements
 * in the list would be all zeros. Ensure that the list is returned in ascending order.
 *
 * Example:
 * createListWithInitialElements(5, 3) => [3, 6, 9, 12, 15]
 * createListWithInitialElements(6, 0) => [0, 0, 0, 0, 0, 0]
 *
 * @param n The size of the list (positive integer)
 * @param initialElement The initial element for the list (integer)
 * @return List of 'n' elements with each element being the next multiple of the initial element
 */
fun createListWithInitialElements(n: Int, initialElement: Int): List<Int> {

    val outList = mutableListOf<Int>()
    
    if (initialElement == 0) {
        return List(n) { 0 }
    } else {
        for (num in initialElement..(initialElement * n) step initialElement) {
            outList.add(num)
        }
    }
    
    return outList
}
/**
 * Given a positive integer 'n' and an initial element, create a list of size 'n' with each
 * element being the next multiple of the initial element. If the initial element is 0, the elements
 * in the list would be all zeros. Ensure that the list is returned in ascending order.
 *
 * Example:
 * createListWithInitialElements(5, 3) => [3, 6, 9, 12, 15]
 * createListWithInitialElements(6, 0) => [0, 0, 0, 0, 0, 0]
 *
 * @param n The size of the list (positive integer)
 * @param initialElement The initial element for the list (integer)
 * @return List of 'n' elements with each element being the next multiple of the initial element
 */
fun createListWithInitialElements(n: Int, initialElement: Int): List<Int> {
/**
 * Given a positive integer 'n' and an initial element, create a list of size 'n' with each
 * element being the next multiple of the initial element. If the initial element is 0, the elements
 * in the list would be all zeros. Ensure that the list is returned in ascending order.
 *
 * Example:
 * createListWithInitialElements(5, 3) => [3, 6, 9, 12, 15]
 * createListWithInitialElements(6, 0) => [0, 0, 0, 0, 0, 0]
 *
 * @param n The size of the list (positive integer)
 * @param initialElement The initial element for the list (integer)
 * @return List of 'n' elements with each element being the next multiple of the initial element
 */
fun createListWithInitialElements(n: Int, initialElement: Int): List<Int> {

    val outList = mutableListOf<Int>()
    
    if (initialElement == 0) {
        return List(n) { 0 }
    } else {
        for (num in initialElement..(initialElement * n) step initialElement) {
            outList.add(num)
        }
    }
    
    return outList
}