I am looking for the title and the author of (I think) a short novel. I read it as a teenager 30 years ago and I think it is much older. Here is a very approximate summary.
Teams of children are put though a series of increasingly difficult tests. They have to obey the rules, but the team we follow sometimes circumvents these rules.
In the final test, one can see on a screen (?) numerous enemy ships, their home planet and a few allied ships. It is a schematic representation. The only rule is: do not use nuclear weapons. But the team does not see any other solution and use nuclear weapons. This destroys the enemies and their planet.
One then understands (or actually one understands gradually through the text) that these tests are real. Adults just refuse to be held responsible for a genocide.