Paste Search Dynamic
append total
  1. n = int(input())
  2. w = []
  3. h = []
  4. tI = []
  5. total = 0
  6. for i in range(n):
  7.     wi, hi, t = map(float, input().split())
  8.     w.append(wi)
  9.     h.append(hi)
  10.     tI.append(t)
  11.    
  12. for i in range(len(tI)):
  13.     if tI[i] == 1:
  14.         if (w[i]**2+h[i]**2)**0.5 >= 26.6:
  15.             total += 1
  16.     else:
  17.         if (w[i]**2+h[i]**2)**0.5 >= 39.6:
  18.             total += 1
  19.  
  20. print(total)
Parsed in 0.072 seconds