A U.S. District Court judge, calling cocaine use "one of the most serious problems facing the country today," yesterday meted out stiff prison sentences to two Washington area men whose arrests last year for selling cocaine sparked investigations into alleged use of drugs on Capitol Hill.

Judge Thomas F. Hogan sentenced Troy M. Todd Jr., 23, of Potomac, who was alleged to be the organizer and supplier of a group of individuals who sold drugs, to serve five to 15 years in prison and pay a fine of $5,000. Douglas W. Marshall, 27, of Northwest Washington was sentenced to serve two to six years and pay a $5,000 fine.

Hogan said he felt compelled to hand down the relatively stiff sentences to Todd, who has one prior conviction for drug possession, and to Marshall, who has no record, because he was concerned about the "corrupting influence" of cocaine on "the very fabric of our society."

Hogan said he did "not know how else to alert the public to the illegality and dangers of cocaine" except by sentencing both men to prison, adding that "drug dealers have to be taught that if you get caught you're not going to get a slap on the wrist."

Todd and Marshall, who left the country shortly before their indictment last November, were arrested in January in Perth, Australia, and were extradited to Washington last April. Marshall pleaded guilty in June to conspiracy to distribute cocaine. Todd pleaded guilty to two felony drug charges in July.

The sentencings yesterday were the last expected in the lengthy Justice Department probe of alleged drug use on Capitol Hill. Two House employes pleaded guilty and were sentenced on drug charges during the course of the investigation. The department last July said it found insufficient grounds to prosecute three congressmen who were targets of the investigation, and officials announced the investigation completed.

Another investigation, headed by House ethics committee special counsel Joseph A. Califano Jr., is still looking into allegations of drug use on Capitol Hill.

Prosecutors, who asked for substantial prison terms for both men, said afterwards they believed the sentences were appropriate. "Both sentences were quite fair," assistant U.S. Attorney Daniel J. Bernstein said after the hearings. Under federal guidelines, Bernstein estimated that Todd would be required to serve approximately six to seven years in prison and Marshall would serve at least two and possibly closer to three years in prison.

Troy Todd Jr. was led off to jail by deputy U.S. Marshals to await transfer to a federal prison. His father declined comment after sentencing.

Marshall remained free on bond until he turns himself in next month.

Marshall's father, Sylvan Marshall, who pleaded with Hogan to allow his son to be placed on probation, said afterwards that the family was "heartbroken" by the sentence.

Marshall was arrested last week in Baltimore on drug charges stemming from an alleged attempt to buy cocaine from an undercover agent. His attorneys yesterday accused the Drug Enforcement Administration of luring Marshall into accepting a gram of cocaine from an undercover informant in that incident in a "transparent attempt to prejudice" Hogan into handing down a stiffer sentence. Marshall faces drug charges in federal court in Baltimore as a result of last week's arrest.

Bernstein said in court that DEA agents had made a decision to pursue allegations from informants that Marshall was selling cocaine. He alleged that Marshall requested a gram of cocaine from a DEA informant to use as a sample for the later sale of a pound of cocaine.