"GrimGrimoire (グリムグリモア Gerimu Gerimoa) is a real-time strategy video game from Vanillaware and Nippon Ichi for the PlayStation 2.
Lillet Blan is a young magician admitted to a prestigious magic school, the Tower of Silver Star. Though she attends normal classes for the first four days and meets the various professors and students, on the fifth day Lillet awakens to learn that everyone in the tower is dead. Before she is killed as well, she is suddenly propelled back in time to her first night at school. Lillet then proceeds to relive the five days before the tragedy over and over again, retaining the knowledge of magic she learns in those five days and desperately trying to solve the mystery to prevent the same events (or worse) from taking place on the fifth day. Over the course of the plot, Lillet discovers dark secrets about her classmates, teachers, and even the academy itself, all of which will lead her to the truth."
Source: Wikipedia, "GrimGrimoire," available under the CC-BY-SA License.