Reports that American students are horrible at math have been greatly exaggerated. Well, not all of them anyway.

The U.S. won the prestigious International Mathematical Olympiad for the first time in more than two decades. Last week, the U.S. team beat the top math students from more than 100 countries who gathered in Chiang Mai, Thailand, for the competition.

“It’s been 21 years,” Team USA’s head coach, Po-Shen Loh, told The Washington Post. “This is a huge deal.”

The U.S. won the competition with 185 points, edging out China by four points. South Korea came in third.

Over the course of the two-day competition, the student teams work on three math problems each.

"If you can even solve one question," Loh told NPR, "you're a bit of a genius."

The atmosphere during the event is very intense, said Loh, who is also an associate professor at Carnegie Mellon University in Pittsburgh.

"I will say that it's not really a super-great spectator sport, in the sense that if you are watching them, it will look like they are thinking," Loh said. "Although I will assure you that inside their heads, if you could spectate, that would be quite a sport."

The last time the U.S. won the math competition was 1994. The math win comes amid reports that American students are falling behind the rest of the world in math and science.

But Loh told NPR, "At least in this case with the olympiads, we've been able to prove that our top Americans are certainly at the level of the top people from the other countries."

A proud Loh tweeted his team's winning score sheet:

According to the Post, five U.S. team members won gold medals: Ryan Alweiss, Allen Liu, Yang Liu, Shyam Narayanan and David Stoner. A sixth member, Michael Kural, missed gold by one point, receiving a silver medal instead.

Loh told the Post that the competition isn't just about national pride; it's also about national improvement.

“Why we are doing this for the country is that basically it plays the same role as the Olympics does in sports: to have some sort of far destination that all of our hundreds of thousands or millions of people in America can reach towards, like a pinnacle in the distance,” Loh said. “It pushes people to reach farther in mathematics.”

Related on MNN:

Mary Jo DiLonardo Mary Jo writes about everything from health to parenting — and anything that helps explain why her dog does what he does.