/**
 * Given a dictionary of musician's albums where the keys are the album names and the values are tuples
 * representing the album's track list, return the total duration of the albums in seconds.
 *
 * @param albums Dictionary of musician's albums.
 * @return Total duration of all the albums in seconds.
 */
fun getAlbumDuration(albums: Map<String, List<Pair<Int, Int>>>): Int {

    var totalDuration = 0

    for (album in albums.values) {
        for (track in album) {
            if (track.first != null && track.second != null) {
                val (minutes, seconds) = track
                totalDuration += (minutes * 60) + seconds
            }
        }
    }

    return totalDuration
}
/**
 * Given a dictionary of musician's albums where the keys are the album names and the values are tuples
 * representing the album's track list, return the total duration of the albums in seconds.
 *
 * @param albums Dictionary of musician's albums.
 * @return Total duration of all the albums in seconds.
 */
fun getAlbumDuration(albums: Map<String, List<Pair<Int, Int>>>): Int {
/**
 * Given a dictionary of musician's albums where the keys are the album names and the values are tuples
 * representing the album's track list, return the total duration of the albums in seconds.
 *
 * @param albums Dictionary of musician's albums.
 * @return Total duration of all the albums in seconds.
 */
fun getAlbumDuration(albums: Map<String, List<Pair<Int, Int>>>): Int {

    var totalDuration = 0

    for (album in albums.values) {
        for (track in album) {
            if (track.first != null && track.second != null) {
                val (minutes, seconds) = track
                totalDuration += (minutes * 60) + seconds
            }
        }
    }

    return totalDuration
}