hablo español XD, from the google traductor:
With my code the codechef editor gives me an error when I run it, I leave a link with the sample of my code, help please
hablo español XD, from the google traductor:
With my code the codechef editor gives me an error when I run it, I leave a link with the sample of my code, help please
Okay, first, I tried copy-pasting the whole code in the codechef editor and met and an IndentationError that ended in Compilation Error.How about trying to check if the white spaces is properly ordered. In my case, all lines are moved 1 line to the right so I needed to move it back left once (ctrl+[).
Hope this helps!
I tried cleaning your code but I don’t know which problem it is so I can’t really make sure it’s correct. If you can, please add the question’s link:
T = int(input())
ALL_ARRAYS = []
rsp = []
for loop in range(T):
N = int(input())
ARR = list(map(str, input().strip(' ').split()))
ALL_ARRAYS.append((ARR, N))
for arr,n in ALL_ARRAYS:
#I don't really understand why you need to check the len of ARR but...
l = len(arr) #To avoid multiple solving of len (leads to TLE if long array)
if (l >= 0 and l <= 10**9) and l == n: #Honestly, you can live without this line
rsp.append(eval(' | '.join(arr)))
for answer in rsp:
print(answer)