Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ch = [int(x) for x in open('17.txt')]
- def summa_kra_8(x, y):
- if (x + y) % 8 == 0:
- return 1
- else:
- return 0
- count = max_sum = 0
- for i in range(0, len(ch)-1):
- for a in range(i+1, len(ch)):
- if summa_kra_8(ch[i], ch[a]):
- count += 1
- max_sum = max(max_sum, ch[i]+ch[a])
- print(count, max_sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement