• + 0 comments

    Solution from my side

    count = 0
        for i in range(len(B)-1):
            if(B[i]%2 ==1 ):
                B[i]+= 1
                B[i+1]+=1
                count +=2
        for j in range(len(B)):
            if(B[j]%2 == 1):
                return 'NO'
        return str(count)