Module??? we have to take care of this?

Revision en2, by lusho, 2017-05-23 16:27:51

Hello Codeforces!

I was solving this problem

http://codeforces.net/contest/810/problem/C

and it gives me a lot of WA, here is my code

27302116

but after that I got an AC, because i just implemented this "+Mod" in this line

-- Sum=(Sum-der)%Mod;

And finally I stay like this

-- Sum=(Sum+Mod-der)%Mod;

27302107

why does it happened?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English lusho 2017-05-23 16:27:51 25 Tiny change: ')%Mod;\n\nwhy do' -> ')%Mod;\n\n[submission:27302107]\n\nwhy do'
en1 English lusho 2017-05-23 16:27:05 403 Initial revision (published)