The latest National Cipher Challenge attracted a record number of entries from secondary school pupils across the UK.
Now in its 11th year, the challenge is organised by the University of Southampton, with support from GCHQ and commercial partners.
More than 6,000 youngsters from 725 schools signed up to decode a series of cryptic codes.
The competition was launched in October by foreign secretary William Hague as part of a series of initiatives aimed at getting youngsters involved in maths and computer science.
The challenge ran for two months, with codes of increasing difficulty being released online for school teams to try and crack.
“Teachers tell me the children find it very gripping and engaging,” said Professor Graham Niblo, organiser of the contest and head of mathematics at the University of Southampton.
“A number of them worked on it at home or went along to maths clubs they wouldn’t usually attend.”
The winning team was the City of London School, who will be presented with a £1,000 prize at an award ceremony in April at Bletchley Park, the site of secret British code-breaking activities during the Second World War.
The team, called Winning Combination and comprising Samson Danziger, Daniel Hu, Anthony Landau and Charlie Hu, managed to crack the final challenge in just over 44 hours.
Andrew Carlotti from St Roger Manwood’s School in Sandwich, Kent, came second, while a 13-strong team from King Edward VII School in Sheffield was third. Visit www.cipher.maths.soton.ac.uk