(a)

Apply the permutation formula for ordered selection:

(40)5=40!(405)!403938373678,960,960

(b)

Apply the combination formula for unordered selection:

(405)=40!5!(405)!40393837365!658,008