/**
 * This function takes two numbers as input and performs a series of repetitive subtractions
 * until the result becomes negative or zero. It returns the number of subtractions performed
 * and the final result.
 *
 * @param num1 The first number.
 * @param num2 The second number.
 * @return A Pair containing the number of subtractions performed and the final result.
 */
fun calculateRepetitionSubtraction(num1: Int, num2: Int): Pair<Int, Int> {

    var count = 0
    var result1 = num1
    var result2 = num2

    while (result1 >= 0 && result2 >= 0) {
        result1 -= result2
        count++
    }

    return Pair(count, result1)
}
/**
 * This function takes two numbers as input and performs a series of repetitive subtractions
 * until the result becomes negative or zero. It returns the number of subtractions performed
 * and the final result.
 *
 * @param num1 The first number.
 * @param num2 The second number.
 * @return A Pair containing the number of subtractions performed and the final result.
 */
fun calculateRepetitionSubtraction(num1: Int, num2: Int): Pair<Int, Int> {
/**
 * This function takes two numbers as input and performs a series of repetitive subtractions
 * until the result becomes negative or zero. It returns the number of subtractions performed
 * and the final result.
 *
 * @param num1 The first number.
 * @param num2 The second number.
 * @return A Pair containing the number of subtractions performed and the final result.
 */
fun calculateRepetitionSubtraction(num1: Int, num2: Int): Pair<Int, Int> {

    var count = 0
    var result1 = num1
    var result2 = num2

    while (result1 >= 0 && result2 >= 0) {
        result1 -= result2
        count++
    }

    return Pair(count, result1)
}