← RoseCode

ROSECODE 326

Lumberjacks

Philippe_57721 · Programming ·

A group of lumberjacks are gathered in a camp.
Each day, in turn, one of the lumberjacks stays in the camp to cook, while the others go to work in 2 teams.
  • The sum of the ages of the 1st team equals the sum of the ages of the 2nd team.
  • The ages of the lumberjacks are all different and are prime numbers.

What is the smallest possible number of lumberjacks and their ages (First solution in lexicographic order).

Answer format: a1,a2,...,an // in ascending order.
[My timing: 2 sec]