Advertisement
Farz0l1x

Untitled

Feb 27th, 2024
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. def f(x, A):
  2.     P = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20}
  3.     Q = {3, 6, 9, 12, 15, 18, 21, 24, 27, 30}
  4.     return ((x in A) <= (x in P)) and ((not(x in Q)) <= (not(x in A)))
  5. A = []
  6. for i in range(1, 1000):
  7.     A.append(i)
  8.     if all(f(x, A) == 1 for x in range(0, 10_000)):
  9.         continue
  10.     else:
  11.         A.remove(i)
  12. print(A, len(A))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement