
A dragon with one hundred
heads is
terrorizing a hamlet.
Lancelot, the dragon slayer, has been summoned. Lancelot's quest : slay the dragon. Particulars: Lancelot's arsonal has only four major weapons. Each weapon is only capable of decapitating a number of heads: Battle Axe (5 heads), Slasher (15 heads), Dragon Scimitar (17 heads), Abyssal Whip (20 heads). However, following each attack the dragon grows back heads: Battle Axe (twenty four heads), Slasher (two heads), Dragon Scimitar (fourteen heads), Abyssal Whip (seventeen heads). The dragon can only be slayed if Sir Lancelot uses an attack that cuts off exactly all its remaining heads. Example: If the dragon has ten heads remaining, it can not be slayed in one attack, but if it has twenty heads it can. Question: What is the minimum number of attacks required to slay the dragon? 