
If you collect every note from school's classes there are clues in each of them for every code but if you just want codes here is the list.
Story Mode
Asakura Ayumi (this is the only you need to progress the story): 534
Aoi Takeshi: 401
Suga Yosie: 505
Tsuchiya Taiko: 377
Hard Mode
Asakura Ayumi (this is the only you need to progress the story): 865
Fog
Asakura Ayumi (this is the only you need to progress the story): 399