Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ans = 0
- with open('N9.txt') as f:
- lines = f.readlines()
- for line in lines:
- a = [int(i) for i in line.split()]
- b = set(a)
- if len(b) + 1 != len(a):
- continue
- rep=-1
- for i in a:
- if a.count(i) == 2:
- rep = i
- S = sum(a) - 2 * rep
- if S <= 4 * 2 * rep:
- ans += 1
- print(ans)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement