Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

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

Revision en1, by lusho, 2017-05-23 16:27:05

Hello Codeforces!

I was solving this problem

http://codeforces.com/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;

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)