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