The bloodshed took place in the philosophy department building of Charles University, where the shooter was a student, police said said. The gunman also died, authorities said.