Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count, maxsum = 0, 0
- n = open(r'D:\17.txt')
- a = []
- for line in n:
- a.append(int(line))
- for i in range(0, len(a)):
- for j in range(i, len(a)):
- if (a[i]+a[j]) % 2 == 1 and (a[i]*a[j]) % 3 == 0:
- count += 1
- maxsum = max(maxsum, a[i]+a[j])
- print(count, maxsum)
Advertisement
Add Comment
Please, Sign In to add comment