SHARE
TWEET

27.1

a guest Feb 14th, 2020 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. d = 4
  2. k = 0
  3. n = int(input())
  4. a = []
  5. for i in range(0, d):
  6.     a.append(int(input()))
  7.     for j in range(0, i):
  8.         if (a[i] + a[j])%2 == 1 and (a[i]*a[j]%13) == 0:
  9.             k += 1
  10. for i in range(d, n):
  11.     x = int(input())
  12.     for j in range(0, d):
  13.         if (x + a[j])%2 == 1 and (x*a[j])%13 == 0:
  14.             k += 1
  15.     a[i%d] = x
  16. print(k)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top