# 數學問題(有關餘數) 贈20點!!

Three vegetarians are shipwrecked on an island on which there is nothing to eat except coconuts. They soon notice that monkeys are eating a large number of the coconuts so, to protect their food supply, they gather all of the coconuts into one big pile. That night, one of the vegetarians gets up and, not trusting the other vegetarians, attempts to take his fair share of coconuts. He divides the coconuts into three equal piles, finds one coconut left over which he tosses to the monkeys, hides one of the piles, combines the remaining two piles into one pile, and returns to bed. The sencond vegetarian then gets up and attempts to take his fair share of coconuts. He divides the pile of coconuts into three equal piles, finds one coconuts left over (which he tosses to the monkeys), hides one of the piles, combines the remaining two pile into one pile, and returns to bed. The third vegetarian then goes through exactly the same procedure. In the morning, the three vegetarians approach the substantially diminshed pile of coconuts and, upon attempting to divide the pile fairly, find themselves prsenting the monkeys with their fourth and final coconut.

What is the smallest number of coconuts that could have been in the pile initially?

Update:

Rating