Processing math: 100%

Problem #215

Go for Gold

Sparky is yet again being accused of being a robot. He needs to solve this question to prove his innocence.

Given a number x and has defined the following functions:

p(x) = x!

s(x) = 1+2+3+ ... +x

Find the value of p(x) mod s(x) for x = 10^9+6

Hint: 10^9+7 is a prime number

Contributed by Manas Gupta

Solved by 223 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.