Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- from random import *
- from itertools import permutations
- from math import gcd
- input = lambda: sys.stdin.readline().strip()
- def mas():
- return list(map(int, input().split()))
- for a in range(1, 1000):
- #один общий делитель != 1 <=> gcd != 1
- f = True
- for x in range(1, 1000):
- f1 = gcd(x, 42) != 1
- f2 = gcd(x, 7) != 1
- if (f1 <= (not(f2))) or (x + a >= 25):
- continue
- else:
- f = False
- break
- if f:
- print(a)
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement