A team of three students from Russia proved their brainy prowess Wednesday, winning an academic competition in which they had just five hours to solve perplexing computing puzzles such as how to connect gears of a clock when given a specific shaft speed.

"I am pleased with our performance today. It feels pretty good," Igor Kulkin, 21, said after his team from Saratov State University won the 2006 Association for Computing Machinery's International Collegiate Programming Contest.

Working in teams of three, contestants in the 30th annual event had five hours to solve 10 problems that would ordinarily take months to complete. Saratov led the pack by solving six of them in the allotted time.

The questions were dizzyingly complex. Among the puzzlers, greatly simplified here:

— Write a program that computes how the gears of a clock can be connected with an hour and a minute hand, based on a provided input shaft speed with a maximum of three gears per shaft.

— Create a program that can find the maximum numbers of degrees of separation for a network of people.

— Develop a system to interconnect different nodes of a corporate network in the cheapest possible way.

In addition to the champion's trophy, the first-place team members won a $10,000 scholarship as well as computer gear from IBM Corp. (IBM), the event's main sponsor.

The awards were handed out during a Texas-themed presentation Wednesday evening complete with stage hands who wore cowboy hats, bandanas and blue jeans to help escort the winners.

There were three runner-up gold medal winners each winning $3,000: the University of Twente in the Netherlands, Altai State Technical University in Russia and Jagiellonian University of Krakow, Poland.

Three schools shared in $2,100 and a silver medal: the Massachusetts Institute of Technology, St. Petersburg State University in Russia and China's Shanghai Jai Tong University.

Bronze medals and $1,050 in prize money went to Ufa State Technical University of Aviation and Moscow State University, both in Russia, as well as two Canadian schools: the University of Waterloo in Ontario and the University of Alberta.

The recognition is considered the biggest reward, said Doug Heintzman, director of IBM's Lotus division.

"They get bragging rights and they have on their resumes that they were here," said Heintzman, who added that IBM has hired 80 contest winners over the years. "Inside the head of one of those kids is a cure for cancer or AIDS. It's sitting out there."

Winners were determined based on how many correct answers they submit within the time limit. In the event of a tie, the schools were ranked based on how many attempts they needed to submit the right answer.

Bill Poucher, the contest's executive director and a computer science professor at Baylor University, the contest's administrative headquarters, explained the difficulty of the problems this way: "When was the last time you heard someone say 'I need a piece of software in 10 minutes?" he asked.

The contest, held earlier in the day in a circular assembly hall, included spectator seating, walkways covered in artificial turf and two overhead projection screens showing real-time scores.

Competitors huddled around glowing computer screens, chatted with teammates and shuffled stacks of paper as they worked against the looming deadline. With minutes to go, many stood up from their tables with a mixed expression of satisfied exhaustion.

Adding to the hushed tension: As each team solved a problem, a colored balloon rose above their table to let rivals and spectators know where they stood.

For many, it was like a sporting event — just with lines of computer code instead of balls and nets.

"It's an intellectual competition, and any competition is a sport," said Andrew Lopatin, 25, a two-time past winner from St. Petersburg State University in Russia and now a coach for that school's team.