HELP !!!!, I am scared of MOD

Revision en1, by dhanunjaygurram12340, 2025-07-10 12:07:44

This might super dumb to ask ,but I really need some clear cut answer to this nightmare of mine Due to this one operation I lost confidence even in questions that I am capable of solving and many Wrong Submissions during the contests where I am having trouble to use this mod (sounds stupid)

Just a simple question....

WHEN & WHERE(i.e in which part of the code) DO I NEED TO USE (% MOD)?

Are there any golden rules on where to use %mod Also what is the guarantee (or any proof kinda thing) that using %mod at a particular place do not change my final answer??

Tags #modulo, #modular_theory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English dhanunjaygurram12340 2025-07-10 12:11:21 2 Tiny change: ' of mine\nDue to t' -> ' of mine\n\nDue to t'
en3 English dhanunjaygurram12340 2025-07-10 12:09:08 24
en2 English dhanunjaygurram12340 2025-07-10 12:08:35 36 Tiny change: '(% MOD)?\n==================\nAre ther' -> '(% MOD)?\n------------------\nAre ther'
en1 English dhanunjaygurram12340 2025-07-10 12:07:44 624 Initial revision (published)