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