Multiply by length
Problem to multiply the each and every digits with length of the given input.
Example-1:
Input : n = [ 1, 3, 5, 4] Output : [4, 12, 20, 16]
Example-2:
Input : n = [ 1, 2, 3] Output : [3, 6, 9]
Solution
n = [ 1, 3, 5, 4] a = len(n) l = [] for x in n: l.append(x*a) print(l)
Output
[4, 12, 20, 16]