Advertisement
NikolayChukanov

27.01.2022

Feb 4th, 2022
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. #1
  2. a = int('1000100110101011', 2)
  3. print(oct(a)[2:])
  4.  
  5. #2
  6. print('С -', 10)
  7. print('О - 010')
  8. print('К -', 11)
  9. print(1001011)
  10.  
  11. #1
  12. def DEL(n, m):
  13.     return n % m == 0
  14.  
  15. def f(x, A):
  16.     return (not DEL(x, A)) <= (DEL(x, 6) <= (not DEL(x, 9)))
  17.    
  18. for A in range(1000, 0, -1):
  19.     #print(A)
  20.     true_is_A = True
  21.     for x in range(1, 1000):
  22.         if not f(x, A):
  23.             true_is_A = False
  24.     if true_is_A:
  25.         print(A)
  26.         break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement