Problem Statement:
Having a good previous year, Monk is back to teach algorithms and data structures. This year he welcomes the learners with a problem which he calls "Welcome Problem". The problem gives you two arrays and (each array of size ) and asks to print new array such that:
;
Now, Monk will proceed further when you solve this one. So, go on and solve it :)
;
Now, Monk will proceed further when you solve this one. So, go on and solve it :)
Input:
First line consists of an integer , denoting the size of and .
Next line consists of space separated integers denoting the array .
Next line consists of space separated integers denoting the array .
First line consists of an integer , denoting the size of and .
Next line consists of space separated integers denoting the array .
Next line consists of space separated integers denoting the array .
Output:
Print space separated integers denoting the array .
Print space separated integers denoting the array .
Input Constraints:
;
;
;
;
Programming using python 2.7.6:
N = input()
A = map(int,raw_input().split()[:N])
B = map(int,raw_input().split()[:N])
for x in
zip(A,B):print sum(x),
No comments:
Post a Comment