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