Advertisement
nq1s788

9

Apr 24th, 2024
659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. file = open('9.csv')
  2. cnt = 0
  3. for s in file:
  4.     #a = sorted(list(map(int, s.split(';')[:3])))
  5.     #if a[0] + a[1] > a[2]:
  6.     #    cnt += 1
  7.     s.split(';')
  8.     a = int(s[0])
  9.     b = int(s[1])
  10.     c = int(s[2])
  11.     if a + b > c and a + c > b and c + b > a:
  12.         cnt += 1
  13. print(cnt)
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement