Step-by-step explanation:
This problem is a bit tedious to work out all at once. The first student opens every locker so lockers 1 to 50 are open.
The second student closes every two lockers so every even locker is closed while every odd locker is open. This will repeat over and over and will take too long.
An alternative for this would be checking the factors of each number. For example, 4 has three unique factors, which are 1, 2 and 4. The number of unique factors determine whether the locker is open or closed. In this case, locker 4 will be open after all 50 students finished. Student 1 opens locker 4, student 2 closes locker 4, student 3 doesn't change locker 4 and student 4 opens locker 4. However, students 5 to 50 will never change the locker.
I can't help put all of the answers at once but this should help.