Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- N = int(input())
- mx = mx10 = mx2 = mx5 = 0
- for i in range(N):
- x = int(input())
- if x % 10 == 0:
- mx10 = max(mx10, x)
- elif x % 5 == 0:
- mx5 = max(mx5, x)
- elif x % 2 == 0:
- mx2 = max(mx2, x)
- else:
- mx = max(mx, x)
- mx_pr = max(mx2 * mx5, mx * mx10)
- print("Вычисленное контрольное значение:", mx_pr)
- pr = int(input())
- if pr == mx_pr:
- print("Контроль пройден")
- else:
- print("Контроль не пройден")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement