If

is left, that means

was spent. So

of the total amount is equal to 39.. Let's say x to the total amount.

check your calculator for the [!] factorial button.
also bear in mind that most calculators also have an [ₙPᵣ] button, to get Permuations, and you can just use that.
Answer:
Come all bad girls to see and show
see d and show b and p
bqn-fozw-cbf