You need the number of ways of getting two numbers the same and the other numbers different divided by the total number of ways.

To get the number of ways of getting two numbers the same and the other numbers different:

First use the pigeon hole principle: .

Now arrange the above: .

So the number of ways of getting two numbers the same and the other numbers different is equal to 240.