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