Beakjoon&프로그래머스/파이썬
[백준/파이썬] 31617번 差 (Difference)
현장
2024. 3. 28. 16:31
-Code
k = int(input())
input()
a_list = list(map(int, input().split()))
input()
b_list = list(map(int, input().split()))
res = 0
for a in a_list:
if a + k in b_list:
res += b_list.count(a + k)
print(res)