Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = open('17.txt')
- count = 0
- Max = 0
- for i in range(len(f)):
- if (f[i] - f[i + 1]) % 2 == 0 and ( f[i] % 31 == 0 or f[i + 1] % 31 == 0):
- count += 1
- Max = max(Max, f[i] + f[i + 1])
- print(count, Max)
Advertisement
Add Comment
Please, Sign In to add comment