Farz0l1x

Untitled

Jul 22nd, 2022
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. f = open('17 (12).txt')
  2. count = 0
  3. max_sum = 0
  4. l = [int(i) for i in f]
  5. for i in range(len(l) - 1):
  6.     for j in range(i + 1, len(l)):
  7.         if (l[i] + l[j]) % 60 == 0 and (l[i] % 40 == 0 or l[j] % 40 == 0):
  8.             count += 1
  9.             max_sum = max(max_sum, l[i] + l[j])
  10. print(count, max_sum)
Advertisement
Add Comment
Please, Sign In to add comment