/**
 * This function takes two integers as inputs and returns the common factors of the two numbers.
 */
fun findCommonFactors(a: Int, b: Int): List<Int> {

    val commonFactors = mutableListOf<Int>()

    // Completing the nested loops to find the common factors
    for (i in 1..a) {
        if (a % i == 0) {
            for (j in 1..b) {
                if (b % j == 0) {
                    if (i == j) {
                        commonFactors.add(i)
                    }
                }
            }
        }
    }

    return commonFactors
}
/**
 * This function takes two integers as inputs and returns the common factors of the two numbers.
 */
fun findCommonFactors(a: Int, b: Int): List<Int> {
/**
 * This function takes two integers as inputs and returns the common factors of the two numbers.
 */
fun findCommonFactors(a: Int, b: Int): List<Int> {

    val commonFactors = mutableListOf<Int>()

    // Completing the nested loops to find the common factors
    for (i in 1..a) {
        if (a % i == 0) {
            for (j in 1..b) {
                if (b % j == 0) {
                    if (i == j) {
                        commonFactors.add(i)
                    }
                }
            }
        }
    }

    return commonFactors
}