100 dresses in a year A woman has a 100 dresses. Every day she wears one of them. For how many ways can we choose dresses for whole year (365 days) if each dress was worn at least once.
So I consider all posibilties: $100^{365}$ and when one dress was'nt worn and later 2 et cetera. So the anwser: $100^{365}-\sum_{i=1} ^{99}i^{365} $. I don't like this solution, but is it correct?
 A: Your formula is not correct.  Look at the same problem only with $3$ dresses and $3$ days.  The answer is $6$, just the permutations on $3$ letters, but your formula gives $3^3 - 2^3-1^3=18$. 
You are correct that, say, $99^{365}$ is the number of ways she might neglect dress #1.  But of course she might neglect dress #2, and so on.  Hence that term should look like $100^*99^{365}$.  But then you see that you have subtracted too much...the cases where she neglects both #1 and #2 are removed multiple times. So now you need to add back the cases in which $2$ dresses are neglected.   Hence $\binom {100}{2} 98^{365}$. Then, similarly, you must then remove the cases in which $3$ are neglected, and so on.  Thus the answer you wanted is $$\sum_{i=0}^{100}(-1)^i\binom {100}{i} (100-i)^{365}$$
As a check, when you apply this methodology to the $3$ dress, $3$ day case you get $$3^3-3^*2^3+3^*1^3=27-24+3=6$$
A: You could say that you are looking for the number of surjections $$f:\{1,\dots,365\}\rightarrow\{1,\dots\,100\}$$
Every function $f:X\rightarrow Y$ induces a partition on domain $X$. 
In this case these partitions have $100$ elements. 
Then the so-called Stirling numbers of the second kind come in sight. 
The number of such partitions is: $$\left\{ {365\atop 100}\right\} :=\frac{1}{100!}\sum_{i=0}^{100}\left(-1\right)^{100-i}\binom{100}{i}i^{365}\tag1$$
Also there must be an ordering of the dresses so this result must be multiplied by $100!$. 
We arrive at:$$\sum_{i=0}^{100}\left(-1\right)^{100-i}\binom{100}{i}i^{365}\tag2$$
This agrees with the answer of @lulu, wich is more direct. Actually that answer proves why equation (1) is valid.
