Advertisement
DialOG_

Untitled

Mar 14th, 2021
702
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. v = c = 0
  2. notk19 = k19 = 0
  3. buf = []
  4. n = int(input())
  5.  
  6. for i in range(0,5):
  7.     buf.append(int(input()))
  8.  
  9. for i in range(5,n):
  10.  
  11.     if buf[0]%19==0:
  12.         k19+=1
  13.     else:
  14.         notk19 +=1
  15.     x = int(input())
  16.     if x % 19 == 0:
  17.         c += k19 + notk19
  18.  
  19.        
  20.     else:
  21.         c += k19
  22.     for j in range(0,4):
  23.         buf[j] = buf[j+1]
  24.  
  25.     buf[4] = x
  26. v = ((n-4)*(n-5)//2) - c
  27.  
  28. print(v)
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement