Kwwiker

27

Aug 25th, 2020
126
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. min_ch = 1001
  2. min_nch = 1001
  3. n = int(input())
  4. for i in range(n):
  5.     t = int(input())
  6.     if t % 2 == 0:
  7.         if t < min_ch:
  8.             min_ch = t
  9.     if t % 2 == 1:
  10.         if t < min_nch:
  11.             min_nch = t
  12. r = int(input())
  13. if (min_ch == 1001) or (min_nch == 1001) or (r != min_ch + min_nch):
  14.     print("Контроль не пройден")
  15. else:
  16.     print("Вычисленное контрольное значение:", min_ch + min_nch)
  17.     print("Контроль пройден")
  18.  
RAW Paste Data