The number 1, 2, 3, ..., n are written in sequence. You're allowed to permute any two numbers. We say that the number k is cool if it is possible to do k permutations and end with the original sequence. How many cool numbers there is between 1 and 1000 including 1 and 1000.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
No explanations have been posted yet. Check back later!