Answer to Question #205490 in Python for ayushi

Question #205490

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:



1
Expert's answer
2021-06-11T22:33:21-0400
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)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS