Gru has not been in the limelight for a long time and is, therefore, planning something particularly nefarious. Frustrated by his minions' incapability which has kept him away from the limelight, he has built a transmogrifier — a machine which mutates minions.

Each minion has an intrinsic characteristic value (similar to our DNA), which is an integer. The transmogrifier adds an integer K to each of the minions' characteristic value. 

Gru knows that if the new characteristic value of a minion is divisible by 7, then it will have Wolverine-like mutations.

Given the initial characteristic integers of N minions, all of which are then transmogrified, find out how many of them become Wolverine-like.

-----Input Format:-----
The first line contains one integer, T, which is the number of test cases. Each test case is then described in two lines.
The first line contains two integers N and K, as described in the statement.
The next line contains N integers, which denote the initial characteristic values for the minions.

-----Output Format:-----
For each testcase, output one integer in a new line, which is the number of Wolverine-like minions after the transmogrification.

-----Constraints:-----
- 1 ≤ T ≤ 100
- 1 ≤ N ≤ 100
- 1 ≤ K ≤ 100
- All initial characteristic values lie between 1 and 105, both inclusive.

-----Example-----
Input:
1
5 10
2 4 1 35 1

Output:
1

-----Explanation:-----
After transmogrification, the characteristic values become {12,14,11,45,11}, out of which only 14 is divisible by 7. So only the second minion becomes Wolverine-like.

Difficulty: EASY

Solutions:
t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	list1 = list(map(int, input().split()))
	list2 = []
	count = 0
	for j in list1:
		a = j + k
		list2.append(a)
	for b in list2:
		if b % 7 == 0:
			count = count + 1
	print(count)


for i in range(int(input())):
	(N, T) = map(int, input().split())
	L = list(map(int, input().split()))
	count = 0
	for i in L:
		if (i + T) % 7 == 0:
			count += 1
	print(count)


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	l = list(map(int, input().split()))
	c = 0
	for i in l:
		if (i + b) % 7 == 0:
			c = c + 1
	print(c)


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	l = list(map(int, input().split()))
	c = 0
	for i in l:
		if (i + k) % 7 == 0:
			c += 1
	print(c)


try:
	for _ in range(int(input())):
		(N, K) = map(int, input().split())
		K = K % 7
		memory = list(map(int, input().split()))
		memory = list(map(lambda x: x + K, memory))
		memory = list(map(lambda x: x % 7, memory))
		print(memory.count(0))
except:
	pass


t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	a = input().split()
	c = 0
	for j in a:
		v = int(j)
		if (v + k) % 7 == 0:
			c += 1
	print(c)


t = int(input())
while t > 0:
	(n, k) = map(int, input().split())
	arr = list(map(int, input().split()))
	cnt = 0
	for val in arr:
		if (val + k) % 7 == 0:
			cnt += 1
	print(cnt)
	t -= 1


t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	l = list(map(int, input().split()))
	s = []
	for i in l:
		s.append(i + k)
	count = 0
	for i in s:
		if i % 7 == 0:
			count += 1
	print(count)


t = int(input())
for tc in range(t):
	(a, b) = map(int, input().split())
	li = list(map(int, input().split()))
	count = 0
	for i in range(a):
		li[i] += b
		if li[i] % 7 == 0:
			count += 1
	print(count)


t = int(input())
for _ in range(t):
	(n, k) = list(map(int, input().split()))
	s = list(map(int, input().split()))
	for i in range(len(s)):
		s[i] += k
	res = 0
	for i in range(len(s)):
		if s[i] % 7 == 0:
			res += 1
	print(res)


T = int(input())
for i in range(T):
	count = 0
	(N, K) = map(int, input().split())
	L = list(map(int, input().split()))
	new_L = [j + K for j in L]
	for wol in new_L:
		if wol % 7 == 0:
			count += 1
	print(count)


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	l = list(map(int, input().split()))
	l = [x + k for x in l]
	count = 0
	for i in l:
		if i % 7 == 0:
			count += 1
		else:
			continue
	print(count)


T = int(input())
for i in range(T):
	(N, K) = map(int, input().split())
	count = 0
	arr = list(map(int, input().split()))
	for u in arr:
		if (u + K) % 7 == 0:
			count += 1
	print(count)


T = int(input())
for t in range(T):
	minions = []
	count = 0
	(N, K) = input().split()
	N = int(N)
	K = int(K)
	mini = input().split()
	for num in mini:
		if num == ' ':
			continue
		else:
			minions.append(int(num))
	for minion in minions:
		M = minion + K
		if M % 7 == 0:
			count += 1
		else:
			continue
	print(count)


T = int(input())
for i in range(T):
	(n, k) = map(int, input().split())
	w = list(map(int, input().split()))
	w_n = list(map(lambda x: x + k, w))
	z = 0
	for i in range(len(w_n)):
		if w_n[i] % 7 == 0:
			z = z + 1
	print(z)


t = int(input())
for _ in range(t):
	(num_minions, added) = map(int, input().split())
	arr = list(map(int, input().split()))
	answer = 0
	for minion in arr:
		if (minion + added) % 7 == 0:
			answer += 1
	print(answer)


for i in range(int(input())):
	(n, k) = map(int, input().split())
	l = list(map(int, input().split()))
	m = [i + k for i in l]
	count = 0
	for j in m:
		if j % 7 == 0:
			count += 1
	print(count)


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	p = list(map(int, input().split()))
	P = []
	c = 0
	for i in p:
		P.append(i + k)
	for j in P:
		if j % 7 == 0:
			c = c + 1
	print(c)


a = int(input())
for i in range(a):
	b = [int(x) for x in input().split()]
	c = [int(y) for y in input().split()]
	d = sum((1 for i in c if (i + b[1]) % 7 == 0))
	print(d)


test = int(input())
for _ in range(0, test):
	(n, k) = list(map(int, input().split()))
	lister = list(map(int, input().split()))
	count = 0
	for x in lister:
		num = x + k
		if num % 7 == 0:
			count += 1
	print(count)


T = int(input())
for _ in range(T):
	(N, K) = map(int, input().split())
	Nm = map(int, input().split())
	mutated = 0
	transmogrifier = [i + K for i in Nm]
	for i in transmogrifier:
		if i % 7 == 0:
			mutated += 1
	print(mutated)


for _ in range(int(input())):
	(onci, mati) = map(int, input().split())
	l1 = list(map(int, input().split()))
	cnt = 0
	for i in range(onci):
		if (l1[i] + mati) % 7 == 0:
			cnt += 1
	print(cnt)


t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	mut = list(map(int, input().split()))
	count = 0
	for item in mut:
		if (item + k) % 7 == 0:
			count += 1
		else:
			count += 0
	print(count)


for i in range(int(input())):
	(n, k) = map(int, input().split())
	N = list(map(int, input().split()))
	s = 0
	for i in range(n):
		p = N[i] + k
		if p % 7 == 0:
			s += 1
		else:
			continue
	print(s)


t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	l1 = [int(x) for x in input().split()]
	count = 0
	l2 = []
	for val in l1:
		l2.append(val + k)
	for i in range(0, len(l2)):
		if l2[i] % 7 == 0:
			count = count + 1
	print(count)


for i in range(int(input())):
	(n, k) = map(int, input().split())
	a = list(map(int, input().split()))
	w = 0
	for i in range(n):
		a[i] = a[i] + k
		if a[i] % 7 == 0:
			w = w + 1
	print(w)


t = int(input())
while t:
	(N, K) = map(int, input().split())
	c = 0
	min = list(map(int, input().split()))
	for i in range(N):
		if (K + min[i]) % 7 == 0:
			c = c + 1
	print(c)
	t = t - 1


for i in range(int(input())):
	yy = input()
	y = [int(e) for e in yy.split()]
	zz = input()
	z = [int(e) for e in zz.split()]
	count = 0
	for i in z:
		a = i + y[1]
		if a % 7 == 0:
			count += 1
	print(count)


for i in range(int(input())):
	(n, k) = map(int, input().split())
	lst = list(map(int, input().split()))
	flag = 0
	for i in range(n):
		lst[i] += k
		if lst[i] % 7 == 0:
			flag += 1
	print(flag)


n = int(input())
for i in range(n):
	(p, q) = map(int, input().split())
	arr = list(map(int, input().split()))
	m = 0
	for j in arr:
		if (j + q) % 7 == 0:
			m += 1
	print(m)


n = int(input())
for i in range(0, n):
	(a, b) = list(map(int, input().split()))
	l = list(map(int, input().split()))
	l = [i + b for i in l]
	count = 0
	for i in l:
		if i % 7 == 0:
			count += 1
	print(count)


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	x = map(int, input().split())
	count = 0
	for k in x:
		if (k + b) % 7 == 0:
			count += 1
	print(count)


for _ in range(int(input())):
	(N, K) = map(int, input().split())
	A = list(map(int, input().split()))
	wolverine = 0
	for i in range(N):
		if (A[i] + K) % 7 == 0:
			wolverine += 1
	print(wolverine)


for _ in range(int(input())):
	(n, k) = [int(x) for x in input().split()]
	a = [int(x) for x in input().split()]
	c = 0
	for i in a:
		aa = i + k
		if aa % 7 == 0:
			c += 1
	print(c)


t = int(input())
for i in range(t):
	cn = 0
	(a, b) = map(int, input().split())
	l = list(map(int, input().split()))
	for i in range(len(l)):
		l[i] += b
	for j in l:
		if j % 7 == 0:
			cn += 1
	print(cn)