# Distributing distinct balls into distinct boxes

i have troubles solving that problem :

In how many ways one can distribute 25 distinct balls into 40 distinct boxes, where only one box contain exactly 10 balls ?

Thanks

Choose one fix box, where you want to put the $10$ balls, then it simplifies to $$40\cdot \text{#ways to distribute 15 balls to 39 boxes, such that no box contains exactly 10 balls}$$ We have $39^{15}$ ways to the distribute this balls in total. At most one box can have exactly $10$ balls in it, so choose this box and distribute the remaining $5$ balls to the remaining $38$ boxes: $$39\cdot 38^5$$ So, the result should be: $$40\cdot (39^{15} - 39\cdot 38^{5})=29378464742845394863241880$$