Gov. Charles S. Robb gave Northern Virginia officials a sympathetic hearing today but offered little hope that Fairfax County can get more state money to improve its roads.

The governor, the first resident of the Washington suburbs to hold the state's top office, said his administration has "recognized the very serious problem in Fairfax County. But we hear almost the same thing from every other jurisdiction in this Commonwealth. There is no way in the world that you can respond to all the legitimate needs . . . . We have to do the best job we can."

Robb told the officials, who complained that Northern Virginia has been shortchanged by the state's highway allocation formula, that any changes in the law distributing the funds will have to be approved by the General Assembly. The legislature has been reluctant to make any major changes in the formula, but Virginia Transportation Secretary Andrew B. Fogarty, a member of Robb's cabinet, today endorsed the need to revise the formula, agreeing that the current one is out of date.

Highway Commissioner T. Eugene Smith of McLean also agreed that the formula needs changing and that Northern Virginia needs help. But he added: "The world does not drop off at the Fairfax County border and neither does the road system."

"There is a lot of interstate funds and a lot of Metro money" going to the suburban Washington area, said state Sen. Richard L. Saslaw (D-Fairfax). "It's not as bleak as initially pictured, although the problems are real and we've got to do something about it."

Fairfax Supervisor Nancy Falck, a Republican who represents the McLean area that Robb calls home, was clearly agitated by the tone of the hour-long briefing, held in a General Assembly committee room. Fairfax is "not trying to be selfish" nor is it trying to "sandbag" projects in other areas, she said. "What we would like is some recognition that we do have a problem. We would like to find out if anyone is interested in helping us."

Other Fairfax supervisors were more pleased with the meeting. "I think we got their attention. That's what we wanted to do," said Supervisor Joseph Alexander, a Democrat from the Lee District.

According to state figures, Fairfax, the state's most populous county, is getting about $3 million for primary state roads in fiscal 1984, about half of the $6.6 million it got this year. Funds for the interstate system in Fairfax have increased considerably, from $17 million in fiscal 1983 to $25.4 million next year.

The meeting with Robb was requested several weeks ago by the Fairfax supervisors. State legislators from the county were annoyed that the supervisors had requested the meeting without contacting them, and said privately that the lack of coordination was embarrassing.

Robb began the meeting by telling the supervisors, "I would respectfully suggest that you have a very able delegation here and anytime you can involve them" it would help the effort.

He also said that he commonly hears from every area of Virginia that they are not getting back what they contribute in a wide variety of programs. He said that it is probably true that areas like Fairfax may be getting fewer transportation dollars per person or per car than a rural area, but Robb said that sparsely populated areas also have crucial needs for roads and bridges that cannot be ignored.

"We are concerned. We want to do something," Robb told the officials. "But I hope you appreciate the scarce resources" available to the state.