Farz0l1x

Untitled

Feb 7th, 2024
910
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. file = open("in.txt")
  2. count = 0
  3. for elem in file:
  4.     A = list(map(int, elem.split()))
  5.     A.sort()
  6.     if (A[-1] < A[0] + A[1] + A[2]) and (A[0] + A[1] == A[2] + A[3] or A[0] + A[2] == A[1] + A[3] or A[0] + A[3] == A[1] + A[2]):
  7.         count += 1
  8. print(count)
Advertisement
Add Comment
Please, Sign In to add comment