Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- del0=0 # дел 2 max
- del1=0 # не дел 2 max
- n=int(input())
- a=0
- for i in range(0,n):
- x=int(input())
- if x%2==0 and x>del0:
- del0=x
- if x%2==1 and x>del1:
- del1=x
- control=int(input())
- if (del1+del0)%2==0:
- a=-1
- else:
- a=del1+del0
- print('полученное контрольное значение:',control)
- print('вычисленное контрольное значение:',a)
- if a==control:
- print('совпали')
- else:
- print("не совпали ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement