Advertisement
Zuneve

Untitled

Apr 29th, 2024
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import sys
  2. from random import *
  3. from itertools import permutations
  4. from math import gcd
  5. input = lambda: sys.stdin.readline().strip()
  6.  
  7.  
  8. def mas():
  9. return list(map(int, input().split()))
  10.  
  11. for a in range(1, 1000):
  12. #один общий делитель != 1 <=> gcd != 1
  13. f = True
  14. for x in range(1, 1000):
  15. f1 = gcd(x, 42) != 1
  16. f2 = gcd(x, 7) != 1
  17. if (f1 <= (not(f2))) or (x + a >= 25):
  18. continue
  19. else:
  20. f = False
  21. break
  22. if f:
  23. print(a)
  24. break
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement