One team plus one team equals a winning combination for the North Carolina School of Science and Math in the annual Moody’s Mega Math (M3) Challenge.

Durham teams took first and third in the national contest, winning $35,000 in scholarships.

The contest drew entries from nearly 1,200 high schools from across the country with the challenge of developing the best answer for “Can school lunches be nutritious, affordable and delicious?”

The team of Steven Liao, Jennifer Wu, Zack Polizzi, Anne Lee and Irwin Li took first place and $20,000 in scholarships.

Six teams of finalists competed for the top awards based on challenges schools face in implementation of the Healthy, Hunger-Free Kids Act.

“The kids did a tremendous job pulling together a lot of different ideas from a lot of different areas of mathematics and worked together as a team really well this year,” said Daniel Teague, a math teacher and coach of the champion team. “We’ve had a number of teams do well in past Challenges, and we are excited to see many continue to study math—some even intern with Moody’s. This experience has been a very positive one and has encouraged the students’ interest in the field.”

The contest was sponsored by the Moody’s Foundation, which is the philanthropic arm of the financial services firm giant, and the Society for Industrial and Applied Mathematics (SIAM). Both are advocates of education in science, engineering, technology and math – or STEM.

“STEM education is critical for continuing the pipeline of talent at Moody’s and elsewhere,” said Frances G. Laserson, president of The Moody’s Foundation. “Providing innovative and competitive opportunities like the M3 Challenge is a priority for us. Reaching more than 5,000 future mathematicians across the country shows the importance and impact of such initiatives.”

Former Secretary of Agriculture Dan Glickman, who spoke to the finalists, said he would help take the results to the U.S. Department of Agriculture.

The North Carolina School of Science and Math launched in 1980.