dxnge

12

Nov 2nd, 2021
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. a = list(map(int, open('17-1.txt').read().split()))
  2. gen = [(x[0]+x[1])//2 for x in zip(a[0::], a[1::]) if x[0]*x[1] % 2 == 1 and (x[0]+x[1])//2 % 7 == 0]
  3. print(len(gen), min(gen))
Advertisement
Add Comment
Please, Sign In to add comment