/**
 * Given two integers n and m, create a list of tuples where each tuple contains two numbers,
 * the first number is from the range [1, n] and the second number is from the range [1, m].
 *
 * Example:
 * Input: createTuples(3, 2)
 * Output: [(1, 1), (1, 2), (2, 1), (2, 2), (3, 1), (3, 2)]
 */
fun createTuples(n: Int, m: Int): List<Pair<Int, Int>> {

    val result = mutableListOf<Pair<Int, Int>>()
    for (i in 1..n) {
        for (j in 1..m) {
            result.add(Pair(i, j))
        }
    }
    return result
}
/**
 * Given two integers n and m, create a list of tuples where each tuple contains two numbers,
 * the first number is from the range [1, n] and the second number is from the range [1, m].
 *
 * Example:
 * Input: createTuples(3, 2)
 * Output: [(1, 1), (1, 2), (2, 1), (2, 2), (3, 1), (3, 2)]
 */
fun createTuples(n: Int, m: Int): List<Pair<Int, Int>> {
/**
 * Given two integers n and m, create a list of tuples where each tuple contains two numbers,
 * the first number is from the range [1, n] and the second number is from the range [1, m].
 *
 * Example:
 * Input: createTuples(3, 2)
 * Output: [(1, 1), (1, 2), (2, 1), (2, 2), (3, 1), (3, 2)]
 */
fun createTuples(n: Int, m: Int): List<Pair<Int, Int>> {

    val result = mutableListOf<Pair<Int, Int>>()
    for (i in 1..n) {
        for (j in 1..m) {
            result.add(Pair(i, j))
        }
    }
    return result
}