/**
 * Given two lists representing the amount of work hours done by two carpenters,
 * determine if one carpenter worked more hours than the other.
 *
 * @param redList A list containing the work hours done by the red carpenter.
 * @param blueList A list containing the work hours done by the blue carpenter.
 * @return A string indicating which carpenter worked more hours. If both carpenters worked
 * the same amount of hours, return "Both carpenters worked the same amount of hours".
 */
fun calculateWorkHours(redList: List<Int>, blueList: List<Int>): String {

    if (redList.size != blueList.size) {
        return "The lists have different lengths, cannot compare."
    }

    // Compare the corresponding elements in the lists to determine the carpenters' hours
    for (i in redList.indices) {
        if (redList[i] > blueList[i]) {
            return "Red carpenter worked more hours than the blue carpenter."
        } else if (redList[i] < blueList[i]) {
            return "Blue carpenter worked more hours than the red carpenter."
        }
    }

    return "Both carpenters worked the same amount of hours."
}
/**
 * Given two lists representing the amount of work hours done by two carpenters,
 * determine if one carpenter worked more hours than the other.
 *
 * @param redList A list containing the work hours done by the red carpenter.
 * @param blueList A list containing the work hours done by the blue carpenter.
 * @return A string indicating which carpenter worked more hours. If both carpenters worked
 * the same amount of hours, return "Both carpenters worked the same amount of hours".
 */
fun calculateWorkHours(redList: List<Int>, blueList: List<Int>): String {
/**
 * Given two lists representing the amount of work hours done by two carpenters,
 * determine if one carpenter worked more hours than the other.
 *
 * @param redList A list containing the work hours done by the red carpenter.
 * @param blueList A list containing the work hours done by the blue carpenter.
 * @return A string indicating which carpenter worked more hours. If both carpenters worked
 * the same amount of hours, return "Both carpenters worked the same amount of hours".
 */
fun calculateWorkHours(redList: List<Int>, blueList: List<Int>): String {

    if (redList.size != blueList.size) {
        return "The lists have different lengths, cannot compare."
    }

    // Compare the corresponding elements in the lists to determine the carpenters' hours
    for (i in redList.indices) {
        if (redList[i] > blueList[i]) {
            return "Red carpenter worked more hours than the blue carpenter."
        } else if (redList[i] < blueList[i]) {
            return "Blue carpenter worked more hours than the red carpenter."
        }
    }

    return "Both carpenters worked the same amount of hours."
}