zad 4 #32

Closed
s426285 wants to merge 9 commits from s426285/DALGLI0:zad_4 into master
Showing only changes of commit d918bd989e - Show all commits

2
hw4.py
View File

@ -62,7 +62,7 @@ class QuotientRing():
nils = [] nils = []
phi = len([ i for i in range(1, self.m) if gcd(i, self.m) == 1 ]) phi = len([ i for i in range(1, self.m) if gcd(i, self.m) == 1 ])
for zero_div in self.zero_divisors: for zero_div in self.zero_divisors:
for i in range(self.m): for i in range(phi+1):
if len((zero_div ** i % self.f).poly) == 0: if len((zero_div ** i % self.f).poly) == 0:
nils.append(zero_div) nils.append(zero_div)
break break