Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sys import stdin
- def count_seven(arr: list) -> int:
- counter = 0
- for num in arr:
- if num % 7 == 0:
- counter += 1
- return counter
- d = {}
- for line in stdin:
- line = list(map(int, line.split()))
- if count_seven(line) not in d.keys():
- d[count_seven(line)] = list(map(str, list(filter(lambda x: x % 7 == 0, line))))
- print(", ".join(d[max(d.keys())]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement