/**
 * Given two tuples, return a new tuple where each element is the XOR of the corresponding elements in the input tuples.
 *
 * @param args1 The first input tuple.
 * @param args2 The second input tuple.
 * @return A new tuple containing XOR of the corresponding elements.
 *
 * Example:
 * xorTuple(listOf(1, 2, 3), listOf(2, 3, 4)) // returns listOf(3, 1, 7)
 */
fun xorTuple(args1: List<Int>, args2: List<Int>): List<Int> {

    require(args1.size == args2.size) { "Input tuples must have the same length" }

    val result = mutableListOf<Int>()
    var index = 0

    while (index < args1.size) {
        result.add(args1[index] xor args2[index])
        index++
    }

    return result
}
/**
 * Given two tuples, return a new tuple where each element is the XOR of the corresponding elements in the input tuples.
 *
 * @param args1 The first input tuple.
 * @param args2 The second input tuple.
 * @return A new tuple containing XOR of the corresponding elements.
 *
 * Example:
 * xorTuple(listOf(1, 2, 3), listOf(2, 3, 4)) // returns listOf(3, 1, 7)
 */
fun xorTuple(args1: List<Int>, args2: List<Int>): List<Int> {
/**
 * Given two tuples, return a new tuple where each element is the XOR of the corresponding elements in the input tuples.
 *
 * @param args1 The first input tuple.
 * @param args2 The second input tuple.
 * @return A new tuple containing XOR of the corresponding elements.
 *
 * Example:
 * xorTuple(listOf(1, 2, 3), listOf(2, 3, 4)) // returns listOf(3, 1, 7)
 */
fun xorTuple(args1: List<Int>, args2: List<Int>): List<Int> {

    require(args1.size == args2.size) { "Input tuples must have the same length" }

    val result = mutableListOf<Int>()
    var index = 0

    while (index < args1.size) {
        result.add(args1[index] xor args2[index])
        index++
    }

    return result
}