Advertisement
nq1s788

6 (с третьим параметром)

May 10th, 2024
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. #https://inf-oge.sdamgia.ru/problem?id=16014
  2. a = [(1, 2), (11,2), (1,12), (11,12), (-11,-12), (-11,12), (-12,11), (10,10), (10,5)]
  3. for A in range(-1000, 1000):
  4.     cnt = 0 #сколько раз встретилось NO для этого A
  5.     for e in a:
  6.         s = e[0]
  7.         t = e[1]
  8.         if (s > 10) or (t > A):
  9.             cnt += 0
  10.         else:
  11.             cnt += 1
  12.     if cnt == 3:
  13.         print(A) #сколько вывелось, такой и ответ
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement