The story began in a classroom of a middle school. Our main character, Kyu, when called by the guidance counselor, declared that he wanted to be a detective. He took the entrance exam to Dan Detective School where talented people from the whole country gather. He passed the difficult entrance exam for the so-called "Q class" (Q = qualified), which is personally instructed by the founder and head master of the school, the legendary famous detective, Dan Morihiko. There he got to know Minami Megumi (Meg) with her photographic memory ability, Touyama Kintarou (Kinta) - the descendant of "Kin-san" from Touyama, Narusawa Kazuma (Kazuma) - a genius programmer, and Amakusa Ryu (Ryu) - the weird Todai (Tokyo University) student. The five of them work together, as well as competing each other, heading towards graduation.