Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open('17-3.txt') as f:
- a = list(map(int, f.read().split()))
- print(len(list(filter(lambda x: sum(x) % 3 == 0 and sum(x) % 6 != 0 and abs(x[0]*x[1]) % 10 == 8, zip(a, a[1:])))))
- print(max(list(map(sum, (filter(lambda x: sum(x) % 3 == 0 and sum(x) % 6 != 0 and x[0]*x[1] % 10 == 8, zip(a, a[1:])))))))
Advertisement
Add Comment
Please, Sign In to add comment