For this Question: Given an array of positive integers A of size N. The power of an array is defined as sum of all elements in it. Calculate the sum of powers of all possible odd - length subarrays.
A subarray is a contiguous subsequence of the array.First line contains an integer N.
Next line contains N space separated integers denoting elements of array.

Constraints
1 <= N <= 1000
1 <= Ai <= 10^5Print the sum of powers of all possible odd - length subarrays.Sample Input 1:
5
1 4 2 5 3

Output 
58

Explanation: 
The odd- length subarrays of A and their sums are:
[1] = 1
[4] = 4
[2] = 2
[5] = 5
[3] = 3
[1, 4, 2] = 7
[4, 2, 5] = 11
[2, 5, 3] = 10
[1, 4, 2, 5, 3] = 15
If we add all these together we get 1 + 4 + 2 + 5 + 3 + 7 + 11 + 10 + 15 = 58

Sample Input 2:
2
1 2

Output 
3

Explanation:
There are only 2 subarrays of odd length, [1] and [2]. Their sum is 3., I have written this Solution Code: a = int(input())
lis = list(map(int,input().split()))
s=0
for i in range(a):
    for j in range(i+1,a+1,2):
       s = s+ sum(lis[i:j])
print(s), In this Programming Language: Python, Now tell me if this Code is compilable or not?