I don't know your attempts, but here is a simple, not too efficient algorithm.
To select a k digit number with distinct digits (of course k $\le$ n),
fill an array A[10] with zeros. This represents the digits chosen, with 0 meaning not chosen. Set your generated number N = 0.
Do this k times:
Generate a random integer m from 0 to n-1 until A[m] = 0. Set A[m] = 1 and N = 10*N+m.
The key to making this more efficient is generating a digit that has not been used before. Another possibility is to have an array with [0,1,2,3,4,5,6,7,8,9] and, each time choose a random entry and then remove the chosen entry, moving all the following one up.
This can probably be done in time O(k), but I can't think of one right now and my copy of Knuth is in the next room.
There's got to be a better way.
$100!$ is the product of only 100 small numbers, each of which have an easily found prime factorization. By the Fundamental Theorem of Arithmetic (and commutativity), the prime factorization of $100!$ can be found by "grouping up" like primes from each of its factors' prime factorizations. For example, $8! = 2^3 \cdot 7 \cdot 2 \cdot 3 \cdot 5 \cdot 2^2 \cdot 3 \cdot 2 = 2^7 \cdot 3^2 \cdot 5 \cdot 7$.
Each of the prime factors can be expanded as powers of 10, e.g. $a\times 10^2 + b \times 10 + c$.
From there, it should be more or less straightforward to distribute over powers of 10 to find each individual digit. Add, and done.
I'll see if I can't MATLAB an example... but here's an example for $8!$:
$$\begin{align*}
8! &= 2^7 \cdot 3^2 \cdot 5 \cdot 7\\
&= (1\times 10^2 + 2\times 10 + 8) \cdot 9 \cdot (3\times 10 + 5) \\
&= (9 \times 10^2 + 18 \times 10 + 72) \cdot (3\times 10 + 5) \\
&= ((9+1) \times 10^2 + (8+7)\times 10 + 2) \cdot (3\times 10 + 5) \\
&= (1 \times 10^3 + 1\times 10^2 + 5\times 10 + 2) \cdot (3 \times 10 + 5) \\
&= 3 \times 10^4 + 3\times 10^3 + 15 \times 10^2 + 6 \times 10 + \ldots \\
&\ldots 5\times 10^3 + 5\times 10^2 + 25\times 10 + 10).
\end{align*}$$
The last step was the distribution of 35 over the previous terms. Now, group like powers by adding. Any time you get a 2-digit multiple of a power of 10, we shift it's digit over to the next higher power of 10.
$$\begin{align*}
8! &= 3\times 10^4 + 9 \times 10^3 + 12\times 10^2 + 12\times 10 \\
&= 3\times 10^4 + 9 \times 10^3 + 13\times 10^2 + 2\times 10 \\
&= 3\times 10^4 + 10 \times 10^3 + 3\times 10^2 + 2\times 10 \\
&= 4\times 10^4 + 3\times 10^2 + 2\times 10 \\
&= 40320.
\end{align*}
$$
Now, here's where it gets really cool.
Polynomial multiplication can be thought of as vector convolution, which is the same thing as the Cauchy product. The number 40320 is basically just a polynomial in powers of 10. Pretend momentarily that 10 isn't a number, just a symbol like $x$. Then,
$$40320 = 4 (10)^4 + 0 (10)^3 + 3 (10)^2 + 2 (10)^1 + 0 (10)^0.$$
We can write this in vector form as $[ 4\ 0\ 3\ 2\ 0 ]$.
If we want to then multiply it by something else, say $10 \cdot 9 = 9 (10)^1$ to compute $10!$, then we find the discrete convolution/Cauchy product of the two vectors. I'll leave that up to you, given that it has been pointed out that some folks generally frown on too-complete solutions to PE problems.
The comments to this post are noteworthy. Yes, this is exactly an implementation of a BigInt library. Yes, this is exactly the multiplication algorithm.
In my opinion, however, the purpose of PE isn't to train people how to go find libraries to do their job; it's to discover the underlying mathematics. Hopefully, the relations I've mentioned between Cauchy Products, discrete convolutions, and the multiplication algorithm are interesting -- more interesting than finding a language with BigInt support.
Best Answer
In this case, I'm afraid you just have to go ahead and calculate $2^{1000}$. There are various clever ways to do this, but for numbers this small a simple algorithm is fast enough.
The very simplest is to work in base 10 from the start. Faster is to work in binary, and convert to base 10 at the end, but this conversion is not completely trivial. A compromise (on a 32-bit machine) would be to work in base 1000000000, so that you can double a number without overflow. Then at the end the conversion to base 10 is much simpler.