First digit of minutes can be from the range [ 0 , 5 ]
for ( i = 5 ; i >= 0 ; i -- ) { if ( hasDigit ( hashMap , i ) ) { flag = true ; time += i ; break ; } } if ( ! flag ) { return " " ; } flag = false ;