PASCAL 2023 Problem 15

Nasim buys trading cards in packages of 5 cards and in packages of 8 cards. He can purchase exactly 18 cards by buying two 5 -packs and one 8 -pack, but he cannot purchase exactly 12 cards with any combination of packages. For how many of the integers n=24,25,26,27,28,29 can he buy exactly n cards?

Answer Choices
A. 5
B. 3
C. 2
D. 4
E. 6