/**
 * In this exercise, you need to create a function that concatenates all the names of the dancers in a given list of strings.
 * Then, you must calculate the modulus of the length of the concatenated string by a given divisor.
 * Your task is to implement the 'concatenateModulus' function to pass the test cases.
 *
 * @param dancers A list of strings representing the names of the dancers.
 * @param divisor The divisor to calculate the modulus of the length of the concatenated string.
 * @return The modulus of the length of the concatenated string by the divisor.
 *
 * Example:
 * concatenateModulus(listOf("John", "Alice", "Bob"), 5)
 * Output: 4
 * Explanation: The concatenated string is "JohnAliceBob", which has length 12.
 * The modulus of 12 divided by 5 is 2 with a remainder of 2.
 */
fun concatenateModulus(dancers: List<String>, divisor: Int): Int {

    var concatenated = ""
    for (dancer in dancers) {
        concatenated += dancer
    }

    val length = concatenated.length

    // Modulus calculation
    val remainder = length % divisor
    return remainder
}
/**
 * In this exercise, you need to create a function that concatenates all the names of the dancers in a given list of strings.
 * Then, you must calculate the modulus of the length of the concatenated string by a given divisor.
 * Your task is to implement the 'concatenateModulus' function to pass the test cases.
 *
 * @param dancers A list of strings representing the names of the dancers.
 * @param divisor The divisor to calculate the modulus of the length of the concatenated string.
 * @return The modulus of the length of the concatenated string by the divisor.
 *
 * Example:
 * concatenateModulus(listOf("John", "Alice", "Bob"), 5)
 * Output: 4
 * Explanation: The concatenated string is "JohnAliceBob", which has length 12.
 * The modulus of 12 divided by 5 is 2 with a remainder of 2.
 */
fun concatenateModulus(dancers: List<String>, divisor: Int): Int {
/**
 * In this exercise, you need to create a function that concatenates all the names of the dancers in a given list of strings.
 * Then, you must calculate the modulus of the length of the concatenated string by a given divisor.
 * Your task is to implement the 'concatenateModulus' function to pass the test cases.
 *
 * @param dancers A list of strings representing the names of the dancers.
 * @param divisor The divisor to calculate the modulus of the length of the concatenated string.
 * @return The modulus of the length of the concatenated string by the divisor.
 *
 * Example:
 * concatenateModulus(listOf("John", "Alice", "Bob"), 5)
 * Output: 4
 * Explanation: The concatenated string is "JohnAliceBob", which has length 12.
 * The modulus of 12 divided by 5 is 2 with a remainder of 2.
 */
fun concatenateModulus(dancers: List<String>, divisor: Int): Int {

    var concatenated = ""
    for (dancer in dancers) {
        concatenated += dancer
    }

    val length = concatenated.length

    // Modulus calculation
    val remainder = length % divisor
    return remainder
}