I don't know how to use Excel but I thought this was an interesting problem so I tried to figure out. Here is how I got it to work. It might not be the best way to do it.
Click Insert -> PivotTable. It will auto select what it thinks should be in the table. You can also manually select the data that you want to have in the pivot table.
Check the check boxes that you want to include in your pivot table (Student ID and Score).
Drag the Student ID from the fields list to the Row Labels box.
In the values box, click the down arrow for "Sum of Student ID" and click Remove Field.
At the end it may look like this:
You can right click on Grand Total and remove it if you don't want a grand total of the students scores. You can also sort by student ID by clicking on the down arrow that appears when you select the cell with the title for your student ID's and choose one of the sorting options.
Thanks for the test data. It was fun to play with.