Farz0l1x

Untitled

Dec 3rd, 2023
961
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. file = open('17_11887.txt')
  2. A = list(map(int, file.readlines()))
  3. count = 0
  4. for i in range(len(A) + 3):
  5.     B = []
  6.     B += [A[i]]
  7.     B += [A[i-1]]
  8.     B += [A[i-2]]
  9.     B += [A[i-3]]
  10.     B = B.sort()
  11.     if (B[0] // 10 < 10 and B[1] // 10 >= 10) or (B[0] // 10 < 10 and B[3] // 10 < 10):
  12.         count += 1
  13. print(count)  
Advertisement
Add Comment
Please, Sign In to add comment