In a first-floor art room at the Thomas Jefferson High School for Science and Technology in Annandale, five ninth-grade whiz kids thrashed the best that the test-makers could throw at them yesterday.

A perfect score in 45 minutes.

And they could have taken as long as three hours.

"We were about to be intimidating and go play cards around the other teams," said Kapil Dandekar, a 15-year-old from Springfield who attends Jefferson. "But we can't leave the room."

Dandekar and his colleagues were taking part in the American Computer Science League All-Stars competition, a one-day Stanley Cup playoffs for the high school computer programming faithful from the United States and Canada.

Once a year, hundreds of these young masters of silicon chips gather to test their proficiency at computer programming. Although they are not launching nuclear missiles or adjusting the Earth's rotation, they are creating four-dimensional rectangles and dwelling on Boolean Algebra.

They say they would rather play with an Apple Macintosh SE than hit a whiffle ball or see a movie.

Computers are "logical, unlike human beings," said Gregory Bloom, the 17-year-old team captain from Portsmouth High School in Rhode Island. "You can tell someone else to do things."

Marc Brown started the nonprofit computer science league 11 years ago in Rhode Island to spur interest in computer programming. He likens programming skills to those of automobile mechanics, and worries that the days of computer proficiency will go the way of people's ability to care for their cars.

"We are concerned that people are treating computers like they treat the telephone, and not bothering to learn how they operate," Brown says. "This is a way of keeping up interest in computers."

Four regional tests already had been held, with the top 15 percent getting invitations to yesterday's event.

The 77 surviving five-person teams -- including entrants from Jefferson and Montgomery Blair High School in Montgomery County -- gathered at the Fairfax school to go head-to-head with hexadecimals, octals and binaries.

After three hours of computer programming questions in the morning, the 400 or so students broke for lunch before attacking math problems in the afternoon.

The prizes were 12 Macintosh computers, with five each going to the top schools in the senior and intermediate divisions, and two going to the junior division.

Teams from Jefferson took first, second, third, fourth and eighth place in the senior division, and the school won two new Apple Macintosh SE computers. Montgomery Blair won fifth place.

In the intermediate division, Montgomery Blair took sixth place, and Coral Gables High School of Florida captured first.

Thomas Jefferson also took second place in the junior division, finishing behind Langham Creek High School of Houston.

In Friday's separate game competition, Woodson High School in Fairfax won second place with East York from Ontario, Canada, taking first.

"This rivals athletic competition," said Jerry Tebrow, a coordinator of the competition and a high school computer science teacher from Coventry, R.I. "They get psyched up just the way an athlete does."

As he methodically sliced his pizza in the cafeteria, Fernando Trias, an 18-year-old senior at Coral Gables High School, explained why he flew up to attend the competition.

"It's a thrill," said Trias, who plans to attend the University of Miami. "It's something I'm good at to see how I compare with others."