MickyOr

Aritmetica Modular

Dec 18th, 2018
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (a + b) % m = [ (a%m) + (b%m) ] % m
  2.  
  3. (a - b) % m = [ (a%m) - (b%m) + m ] % m
  4.  
  5. (a * b) % m = [ (a%m) * (b%m) ] % m
  6.  
  7. (a / b) % m = [ (a%m) * ((b^-1)%m) ] % m
  8.  
  9. Inverso modular con Fermat's Little Theorem:
  10. a^-1 = a^(p-2) (%p)
RAW Paste Data