• + 0 comments

    as the input for number of students and subjects is given in same line, OP is spliting the input string into list and taking 2nd element of the list to iterate those many times.