Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = int(input())
- b = int(input())
- k=0
- print("number for dividing:")
- n=int(input())
- nok=a*b
- while a != b:
- if a > b:
- a = a - b
- else:
- b = b - a
- resh=[1]*(n+1)
- resh[0]=0
- resh[1]=0
- for i in range(n) :
- if resh[i]==1:
- k=i*i
- while (k<=n):
- resh[k]=0
- k=k+i
- print("NOD:",a)
- print("NOK:",nok/a)
- for i in range(n+1):
- if resh[i]==1:
- if n%i==0: print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement