Advertisement
HuangYuSan

Untitled

Apr 30th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. nonzeroElements p = [1..p]
  2. inverse a p = head [ b | b <- nonzeroElements p, b*a `mod` p == 1]
  3. inverses p = [ (a, inverse a p) | a <- nonzeroElements p ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement