Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from __future__ import division, print_function
- def inverse():
- n = 1
- count = 0
- while n < 100:
- m = 1
- while m < n:
- if m*(n-m) % n == 1:
- count = count + 1
- text = open("integers3.txt", "a")
- print ("\nIntegers mod", n, "for values", m, "and", n-m, file=text)
- print("Integers mod", n, " ----> ", m, n-m)
- break
- m = m + 1
- n = n + 1
- print("There exists", count, "such m's in this range")
- text.close()
- inverse()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement