Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open('9.txt')
- count = 0
- for s in file:
- A = list(map(int, s.split()))
- A.sort()
- if (A[0] + A[1] == A[2] + A[3] or A[0] + A[3] == A[2] + A[1] or A[0] + A[2] == A[1] + A[3]) and A[3] < A[0] + A[1] + A[2]:
- count += 1
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement