for this code
input:
4
0 5
1 0
2 10
3 6
4
0 -5
1 0
2 -10
3 -6
output:
(nothing)
expected output:
sum = 0
n = int(input())
p = [0] * n;
for i in range(n):
  a, b = map(int, input().split())
  p[a] = b;
  sum = sum + b
  Â
m = int(input())
q = [0] * m
for j in range(m);
  a, b = map(int, input().split())
  q[a] = b
  sum = sum + b
print(sum)
Comments
Leave a comment