Seven pirates share 77 gold coins that were arranged in a line. The first pirate takes every seventh coin, the second pirate takes every sixth coin, the third pirate takes every fifth coin, . . . the seventh pirate takes all the rest.