Students gave President Reagan a landslide victory in Virginia in a mock presidential election last week, but Democrat Walter F. Mondale won overwhelmingly in the District and narrowly carried Maryland.

Nationally, Reagan got 59.4 percent of the more than 1.6 million votes cast in the 1984 Student-Parent Mock Election, a project endorsed by both major parties.

Officials of the Tandy Corp., which tabulated the results Friday, said that Reagan carried 44 states with 979,489 votes, while Mondale took five states and the District with a total vote of 668,834.

Hawaii did not participate.

Most of the voters were high school students.

In Virginia, Reagan won by 50,685 votes to 27,701. Republican U.S. Sen. John W. Warner defeated Democratic challenger Edythe Harrison by a margin of more than 3 to 1, while incumbents carried the two House seats in Northern Virginia -- Stan Parris by a 5-to-2 margin in the 8th Congressional District and Frank R. Wolf by slightly less than 2 to 1 in the 10th District.

In Maryland, Mondale got 46,206 votes, or 50.6 percent, to 45,160 votes for Reagan.

Students in Prince George's County gave Mondale 53.5 percent of their votes. Schools in Montgomery County did not participate.

Mondale defeated Reagan by almost 2 to 1 in the District.

The other states that Mondale carried were Connecticut, Illinois, Mississippi and New York.