GUVI
Back

Doubt in basic program 27

Created 3 years ago
401 Views
1 Comments
Swapna
@Swapna
Swapna
@SwapnaProfile is locked. Login

Given a number N and an array of N elements, find the Bitwise OR of the array elements. Input Size : N <= 100000

Sample Testcase :

INPUT

2

2 4

OUTPUT

6

i am getting error:invalid literal for base 10 at line 5

n=int(input())

l=[]

sum=0

for i in range(0,n):

ele=int(input())

l.append(ele)

for j in l:

sum=sum+j

print(sum)

Comments
Please login to comment.
 
Powered by habitate.io Habitate