Write a program to print the following output,
Sample Input1
2
5
1 2 3 4 5
6
2 20 3 30 4 40
Sample Output1
33
201
n = int(input())
a = int(input())
f = [int(i) for i in input().split()]
b = int(input())
s = [int(i) for i in input().split()]
print(n * sum(f) + 3)
print(n * sum(s) + 3)
Comments
Leave a comment