/**
 * This function calculates the total units of electricity consumed by an electrician in a given period of time.
 *
 * @param n Number of days in the period.
 * @param m Number of hours in a day.
 * @param arr List of electricity consumption readings.
 * @return Total units of electricity consumed.
 */
fun calculateTotalUnits(n: Int, m: Int, arr: List<List<Int>>): Int {

    var totalUnits = 0

    // Nested for loop to iterate over each day and hour
    for (day in 0 until n) {
        for (hour in 0 until m) {
            // Calculate units consumed in each hour and add it to the total units
            totalUnits += arr[day][hour]
        }
    }

    return totalUnits
}
/**
 * This function calculates the total units of electricity consumed by an electrician in a given period of time.
 *
 * @param n Number of days in the period.
 * @param m Number of hours in a day.
 * @param arr List of electricity consumption readings.
 * @return Total units of electricity consumed.
 */
fun calculateTotalUnits(n: Int, m: Int, arr: List<List<Int>>): Int {
/**
 * This function calculates the total units of electricity consumed by an electrician in a given period of time.
 *
 * @param n Number of days in the period.
 * @param m Number of hours in a day.
 * @param arr List of electricity consumption readings.
 * @return Total units of electricity consumed.
 */
fun calculateTotalUnits(n: Int, m: Int, arr: List<List<Int>>): Int {

    var totalUnits = 0

    // Nested for loop to iterate over each day and hour
    for (day in 0 until n) {
        for (hour in 0 until m) {
            // Calculate units consumed in each hour and add it to the total units
            totalUnits += arr[day][hour]
        }
    }

    return totalUnits
}