fork download
  1. def Edinica(N):
  2. R = 0
  3. c = 1
  4. i = 1
  5. while i <= N:
  6. c = (c *2) % N
  7. if c == 1 :
  8. #print( N, i)
  9. R = i
  10. i = N
  11. i +=1
  12. return R
  13. a = 17
  14. b = 59
  15.  
  16. x = a * b
  17. q = int(x.bit_length())
  18. print (a, b, x, q)
  19. y = 11
  20. N = x * y
  21. q = int(N.bit_length())
  22. print ( x, y, N, q)
  23. c1 = Edinica(N)
  24. c2 = Edinica(x)
  25. c3 = Edinica(y)
  26. print(c2, c3, c1, c1/c2)
  27. v1 = N % c1
  28. v2 = x % c2
  29. w1 = a * y + b
  30. w2 = b * y + a
  31. w3 = a * b + y
  32. print(v1,v2, w1,w2,w3, v2 * y)
Success #stdin #stdout 0.01s 7300KB
stdin
Standard input is empty
stdout
(17, 59, 1003, 10)
(1003, 11, 11033, 14)
(232, 10, 1160, 5)
(593, 75, 246, 666, 1014, 825)