NIKOLAY_TETUS

Untitled

Jun 15th, 2021
514
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##15 задание
  2. val = True
  3.  
  4. for a in range(-100, 100):
  5.     val = True
  6.     for x in range(0, 100):
  7.         for y in range(0, 100):
  8.             if ((6*x + 4*y != 34) or (a > 5*x + 3*y) and (a > 4*y + 15*x - 35)) == False:
  9.                 val = False
  10.     if val is True:
  11.         print(a)
  12.  
  13.  
  14. ##23 Задание
  15. bigList = list()
  16.  
  17. def F(x, arr):
  18.     global bigList
  19.     if x > 20:
  20.         return
  21.     elif x == 20:
  22.         if 9 in arr and 12 in arr:
  23.             bigList.append(arr)
  24.         else:
  25.             return
  26.        
  27.     F(x+1, arr + [x+1])
  28.     F(x+3, arr + [x+3])
  29.     F(x*2, arr + [x*2])
  30.    
  31.  
  32. F(3, [])
  33. print(len(bigList))
  34.  
RAW Paste Data