Compare commits

...

1 Commits

Author SHA1 Message Date
84daabe853 Upload files to ''
python 2.7.12
2018-06-01 11:34:25 +00:00

60
Proj1.py Normal file
View File

@ -0,0 +1,60 @@
from math import *
def explore():
n=input("podaj n ")
n=int(n)
resztyn = []
for x in range(0,n):
resztyn.append(x)
print "Elementy odwracalne: "
for a in range(0,len(resztyn)):
for b in range(0,len(resztyn)):
c=((a*b)%n)
if c==1 :
print a
else:
continue
print "Dzielniki zera: "
for a in range(0,len(resztyn)):
for b in range(1,len(resztyn)):
c=((a*b)%n)
if c==0 :
print a
break
else:
continue
print "Elementy idenpotentne:"
for a in range(0,len(resztyn)):
c=((a*a)%n)
if c==a:
print a
else:
continue
print "Elementy nilpotentne:"
print "0"
for a in range(1,len(resztyn)):
for p in range(1,1000):
c=((a**p)%n)
if c==1:
break
if c==0:
print a
break
else:
continue
print '\n'
while 1:
explore()