C problem of today's contest, getting negative value even after applying modulo operator

Revision en1, by you_know_wh0, 2021-03-29 20:55:51

i am getting negative value even after applying %M operation at all steps. i dont understand where i'm doing wrong//i wrote this code for C problem of today's contest-codeforces round #711

my code: my code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English you_know_wh0 2021-03-29 20:55:51 366 Initial revision (published)