Advertisement
nq1s788

15 с отрезками

Oct 16th, 2024
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. mn = 10000000
  2. for l in range(100):
  3.     for r in range(l, 100):
  4.         f = True #а пока что подходит
  5.         for x in range(100):
  6.             if not ((((8 <= x) and (x <= 39)) or ((l <= x) and (x <= r))) <= (((23 <= x) and (x <= 58)) or ((l <= x) and (x <= r)))):
  7.                 f = False
  8.         if f:
  9.             mn = min(mn, r - l + 1)
  10. print(mn)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement