Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tests = input()
- res = 0
- for i in range(int(tests)):
- n, k = raw_input().split()
- n = int(n)
- k = int(k)
- test = raw_input().split()
- count = 0
- for x in test:
- if int(x) <= 0:
- count += 1
- if count < k:
- res = res + pow(2, int(tests) - i - 1)
- print(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement