They were warned that clapping their hands as they walked would help keep bears from attacking.

They discovered it was impossible to buy a hamburger for less than $6.

These 44 Montgomery County high school students, who returned last week from a U.S. town that is closer to the Soviet Union than it is to Rockville, are members of the youth group of the Rockville Presbyterian Church. Accompanied by nine adults from the congregation, they spent 10 days in Yakutat, Alaska, building a house for the local pastor and his family.

This is the third year that Rev. Margee Adams and her husband, James, also a pastor at the church, have organized "work trips" for high school students. But the Yakutat mission required the most planning and fund raising by far, she said.

With the guidance of a volunteer builder from Juneau, the Yakutat pastor and his brother-in-law, who was visiting from West Virginia, the students poured cement, installed insulation and painted the walls until they had transformed a wooden frame into a nearly complete three-bedroom home.

Recalling their experiences last week, a half dozen of the students agreed that the most difficult task was learning to get along as a group of 53 people living in one room of the local Presbyterian church, sharing two toilets and having to walk more than a mile to take a shower at the local high school.

Chris Shea, 16, spent most of the l0 days filling a wheelbarrow with dirt and depositing it 20 feet away into the foundation of the house. "It was a job as important as anything else that was being done," he said, noting that the work day lasted from early morning until the sun set at about 10:30 p.m.

Located in Alaska's southeast strip, Yakutat is a town of about 400 in the winter and 150 in the summer. Many residents go fishing in other parts of Alaska during the summer to earn money for the rest of the year.

The only ways to reach the village are by plane (as the group did) or boat or, as Jim Caperton, 17, noted, dogsled. It reportedly was snowing there well into June.

The group, which included the three Adams children, spent the Fourth of July on the beach on Yakutat Bay.

"I was used to Ocean City where there are houses all over. Everything on the beach was just land and there were no people," said Mary McDonald, 16, who said she gave up a summer job to go on the trip.

Any high school student belonging to the church was eligible to participate in the misson, which also included four days of sightseeing in Anchorage and a day in Seattle. Adams said she was suprised when nearly every student signed up--44 out of about 50 church members.

The trip cost the group $34,000. Each person was expected to contribute $200, with the rest coming from donations, yard sales, pizza dinners, T-shirt sales, cabarets, cheese sales, car washes, doughnut sales and other fund-raising activities during the past year.

Adams explained that the cost per person was set at $200 so that no one would be excluded for financial reasons.

"Even though this is Montgomery County, there were a substantial number who could not have gone if it were more," she said.

Adams said next year's mission will be helping repair Jubilee Housing Project and the Columbia Road Clinic in the District of Columbia.

"The church can't stand this kind of intensive fund raising [required for the Alaska trip]. People get tired of being asked for money," she said. It is also important to show that the group doesn't "have to go 5,000 miles away from home to give of themselves."

Previous trips were to a Navajo reservation in Arizona and to a camp for the mentally handicapped in West Virginia.

In Yakutat, the students split into teams responsible for food preparation and laundry, in addition to the construction work. They brought their own food with them to avoid paying the high Alaskan prices. Commmunity residents gave the group fresh salmon and moose, two staples of the Yakutat diet.

The Montgomery County youths said they met a number of Yakutat teen-agers who seemed to feel threatened by their presence. They agreed that the tension might have eased if some of the Yakutat students had helped them build the house. The Yakutat youths avoided working on the project, though, because they seemed to view it as the mission of the Maryland group, Adams said.

The Rockville group celebrated four birthdays and the Adams' 19th wedding anniversary during the trip. One of the participants, Jim Caperton, broke his leg during a July 4 football game on the beach. But although several members of the group spotted bears, they avoided serious encounters.

One student kept a journal listing the things he missed most: "private bathroom, Channel 26, David Letterman, dishwasher, baseball scores, outside news, clean floors."