ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1560. Elementary Symmetric Functions

Please help
Posted by Samsonov Ivan (Rybinsk SAAT) 22 Sep 2007 18:25
"You should compute their values modulo prime P."
(-1235+1+1+1+1+1)%1237=-1230, but answer 7. I do not understand =(
Re: Please help
Posted by Vedernikoff Sergey 22 Sep 2007 18:38
According to famous mathematical convention we can write
a % b = (n*b + a) % b as n tends to infinity. So, -1230 % 1237 is equivalent to (-1230 + 1237) % 1237 == 7