Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mods = [7, 8, 12, 14]
- for mod in mods:
- for x in range(0, mod):
- xsq = x * x
- xsq %= mod
- fx = -5 * x
- fx %= mod
- total = xsq + fx + 6
- total %= mod
- if total == 0:
- print("Z", mod, ": ", x, sep="")
- # Z7: 2
- # Z7: 3
- # Z8: 2
- # Z8: 3
- # Z12: 2
- # Z12: 3
- # Z12: 6
- # Z12: 11
- # Z14: 2
- # Z14: 3
- # Z14: 9
- # Z14: 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement